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

Re: SPLIT()ing headache

by kwoff (Friar)
on Nov 06, 2001 at 00:36 UTC ( [id://123413]=note: print w/replies, xml ) Need Help??


in reply to SPLIT()ing headache

I think the (or at least a) relevant part of your code is:
#HERE IS THE SPLIT PROBLEM AREA! $tparse=split(/-/,$current); $writer=$tparse['2'];
$tparse is a scalar, so split will return a number, like 3.

`perldoc -f split`

... In scalar context, returns the number of fields found and splits into the "@_" array. Use of split in scalar context is deprecated, however, because it clobbers your subroutine arguments.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-25 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found