How so? Every time it runs it clears the file, and the message always is on the same line, and if the keyword doesn't match any command it returns an error
It may seem like homework because i have no idea what im doing, and i don't want to look stupid because of how retarded my code looks lol. I've tried a few things including
open(INBOX,'/var/spool/mail/chuck') or die "$!";
$line = 0;
while(<INBOX>) {
if ($line >= 27) {
my $command == $_;
print...
I'm trying to write a program that reads the 27th line of a file(chuck), then depending if the line contains a command(hello) then have it print a line(Goodbye). I've tried to find examples of how to do this but its never worked properly. If somebody could just show me how this would work using...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.