in reply to Re^3: Print contents of text file line by line
in thread Print contents of text file line by line
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,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Print contents of text file line by line
by hippo (Archbishop) on Jun 25, 2018 at 14:37 UTC |