http://www.perlmonks.org?node_id=11104819


in reply to Suggestion on rewriting small code

Normally I don't like to mess around with special variables (see perlvar) this way, but this is too neat:

c:\@Work\Perl\monks>perl my @arr = (12341,1245125,1525125,125125125); my $str = do { local $" = ' || job=='; "job==@arr"; }; $" eq ' ' or die 'localization failed'; $str eq 'job==12341 || job==1245125 || job==1525125 || job==125125125' or die 'nope'; print ">$str< ok"; __END__ >job==12341 || job==1245125 || job==1525125 || job==125125125< ok


Give a man a fish:  <%-{-{-{-<