Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Some code

by CukiMnstr (Deacon)
on Apr 24, 2002 at 21:11 UTC ( [id://161791]=note: print w/replies, xml ) Need Help??


in reply to Some code
in thread use strict seems to hose my code

Maybe you stripped more than what you had to to post your code here, but from what I can see,
my ($buffer,$name,$value,@pairs,$pair); @pairs = split(/&/, $buffer);

you are acting on an empty $buffer: the my declaration of $buffer 'initializes' it, so when you use split() to get the values from it, you are acting on an 'empty' variable. You might want to move that

my ($buffer);
a little higher on your script.

Do you get any warnings that tell you you are acting on undefined data? try printing $buffer before and after the split(), because it might tell you the problem is there...

Update: you say you don't even get 'empty' lines printed, which tells me you never run the for() loop... try to print() @pairs before entering the for()

hope this helps,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-18 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found