You can use die instead of print and exit. Also, die throws exceptions, so they can be catched and handled outside the running code. This can be useful for generating backtraces and other debugging things.print "Cannot open file \"$filename\"\n\n"; # Line 16 exit;
@all_sentences=(my $sentence); # Line 34Did you mean push? push @all_sentences,$sentence;
my $diff_letters="code?????"; # Line 38You can use ... when you don't know what to write, Perl will automatically throw "Unimplemented" exception at this point. Anyway, did you mean for (1..$#all_sentences) {print abs(length $all_sentences[$_-1] - length $all_sentences[$_]), "\n";}? See abs, length, perlsyn for more information.
In reply to Re: How can I store a scalar variable, coming out of a do-until loop, as an element in an array for further operations?
by aitap
in thread How can I store a scalar variable, coming out of a do-until loop, as an element in an array for further operations?
by supriyoch_2008
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |