[Israel.pm] mangled $_

Zohar Kelrich lumi at musicgenome.com
Thu Dec 23 07:31:30 PST 2004


On Thu, 23 Dec 2004 16:58:58 +0200 (IST), Jason Friedman  
<jason.friedman at weizmann.ac.il> wrote:

>   my $underscore = $_;  my $cap_title =  
> capitalize_title($1,PRESERVE_ALLCAPS => 1);  $_ = $underscore;
>Is there a better way of doing this or at least being warned?


How about

    sub my_cap { local $_; capitalize_title(@_); }

?



More information about the Perl mailing list