in reply to Re^6: Have you netted a Perl Monk or Perl Pretender in 5 minutes or less?
in thread Have you netted a Perl Monk or Perl Pretender in 5 minutes or less?

Correct you are, my bad. I'm used to calling that in a different context so I looked back at the code I had actually been using. This is what would actually work the way I described:
use strict; use warnings; my $c = 1; my $d = undef; sub sbr { $c = 2 unless $c; print "c = $c\n"; $d = 4 unless $d; print "d = $d\n"; } sbr();


Thanks for correcting my mistake
  • Comment on Re^7: Have you netted a Perl Monk or Perl Pretender in 5 minutes or less?
  • Download Code