in reply to Re: What will this print?
in thread What will this print?
I had to laugh out loud at this one. I've used this meme so many times in my first real language, Pascal (where it actually does what you expected), and hated it every single time, that I picked it up from a mile away against the wind. The marks of one's upbringing.. :)my $animal = 'pig'; foreach $animal ('cat', 'dog', 'horse') { last if $animal eq 'dog'; } print "$animal\n";
Makeshifts last the longest.
|
|---|