Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Suggestion on rewriting small code

by AnomalousMonk (Bishop)
on Aug 21, 2019 at 15:00 UTC ( #11104819=note: print w/replies, xml ) Need Help??


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:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11104819]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2019-09-19 02:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (238 votes). Check out past polls.

    Notices?