Quoth Achim Peters <>:
>
> How about
Where is
use strict;
use warnings;
> $good_book = "Learning Perl";
my $good_book = ...;
> $preferred_beverage = "Cup o'Tea";
> # don't wanna recommend Cup o'Java here ...
>
> open BOOK "<" $good_book or die $!;
You're missing a comma after "<".
You should use lexical filehandles.
You should say what you were trying to open.
open my $BOOK, '<', $good_book
or die "can't open '$good_book': $!";
> while (<BOOK>) {
Would you really read a book line-by-line? I would expect to leave at
least a paragraph between sips, so we need
local $/ = '';
before the while loop.
> read;
Not enough arguments for read...
You probably want to choose a different sub name.
> sip($preferred_beverage);
> }
Ben