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

(zdog) Re: variables for variables

by zdog (Priest)
on May 31, 2001 at 00:25 UTC ( #84367=note: print w/ replies, xml ) Need Help??


in reply to variables for variables

split() has to used in the following way:

split (/\,/, $fieldList);

Also, it would be helpful for you if you took the extra step and inserted use strict; and declared variables using my().

Zenon Zabinski | zdog | zdog7@hotmail.com


Comment on (zdog) Re: variables for variables
Select or Download Code
Re: (zdog) Re: variables for variables
by no_slogan (Deacon) on May 31, 2001 at 00:49 UTC
    You're wrong about split. It can take a string and interpret it as a regex. You don't need to escape commas in a regex, either. If you want to, fine, but it's not necessary.

    Using strict is just going to make the code fail worse. Not that that's a bad thing.

    The problem is the single quotes in $in{'$field'}. But please, please read Dominus's article (mentioned above) about why you shouldn't be doing this in the first place.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2015-07-04 18:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls