Re: small puzzle

2014-04-27 Thread Harry Putnam
Shawn H Corey writes: > On Fri, 25 Apr 2014 12:39:21 -0700 > John SJ Anderson wrote: > >> Perl doesn't charge you by the lines of code you use, so doing this: >> >>my $re = shift; >>$re = qr/$re/; >> >> is just fine. > > This also works: > > my $re = qr/$ARGV[0]/; > shift @ARGV

Re: small puzzle

2014-04-27 Thread Harry Putnam
Uri Guttman writes: > On 04/25/2014 12:55 PM, Harry Putnam wrote: >> Uri Guttman writes: >> >>> why would you expect anything but 1 as the value? shift will return 1 >>> value or undef. that anon array will be dereferenced to an array with >>> 1 entry. the array is in scalar context which return