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.
Sorry if my advice was wrong.
|
---|
In Section
Seekers of Perl Wisdom