Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Split

by mikfire (Deacon)
on Feb 14, 2001 at 09:40 UTC ( #58296=note: print w/replies, xml ) Need Help??


in reply to Re: Split
in thread How do I use Split

Just to clarify something here, you got the correct answer for what you asked perl to do. split() expects a scalar, which caused @_ to be evaluated in scalar context. In this case that was 1, since you where sending but one arguement to the subroutine. split() applied your regex and returned (1,undef,undef).

I might suggest you read up on -w and use strict; as well - it would have at least flagged a warning on that line. It will also save you a lot of grief sooner or later.

mikfire

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2020-05-29 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (169 votes). Check out past polls.

    Notices?