Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: perlish way of splitting file records

by VSarkiss (Monsignor)
on Jun 01, 2006 at 16:39 UTC ( #553088=note: print w/ replies, xml ) Need Help??


in reply to Re: perlish way of splitting file records
in thread perlish way of splitting file records

The parenthesis following print is assumed to contain its arguments. You can either enclose everything in parens as you've done, or disambiguate in some other way, such as with unary plus. Consider:

$ perl -MO=Deparse -e 'print ((split /:/,<FILEHANDLE>)[3])' print((split(/:/, <FILEHANDLE>, 0))[3]); -e syntax OK $ perl -MO=Deparse -e 'print +(split /:/,<FILEHANDLE>)[3]' print((split(/:/, <FILEHANDLE>, 0))[3]); -e syntax OK


Comment on Re^2: perlish way of splitting file records
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2015-03-29 03:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (630 votes), past polls