So I corrected my code and added this to create an array: my @line = <$fh>;
how can I add an if statement to check if the 7th element of the array does exist?
I've tried something like this but it did not work:
if ($line[6]){ print "Support Group: $line[6]"; }else print "Support Group:UNKNOWN $line[6]";
Thanks,
In reply to Re^4: Print contents of text file line by line
by TonyNY
in thread Print contents of text file line by line
by TonyNY
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |