Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: faking out

by thezip (Vicar)
on Dec 19, 2007 at 23:52 UTC ( #658013=note: print w/replies, xml ) Need Help??

in reply to faking out

To expand on Joost's suggestion, you could create a file containing the pre-specified NAME=VALUE pairs.
__DATA__ foo_field=foo's_value bar_field=bar's_value ...
Then, it's just a matter of getting a filehandle and instantiating a CGI object with it:
open(IFH, $CGI_filename) || die ... my $query = CGI->new(IFH); my $field = $query->param('foo_field'); print $field, "\n"; __OUTPUT__ foo's_value

Your wish is my commandline.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://658013]
[JohnCub]: "A ref too far" would make a good title for anyone's perl memoirs
[thepkd]: Anyways it works with $aohoaoh[0]->{'foo '}[0]->{'bar'}
[GotToBTru]: "I did it my $way"
[JohnCub]: I hope $way isn't a hashref. ;)
[GotToBTru]: many times i've been told I made a real hash of thiings
[GotToBTru]: so .. perhaps it should b e
[thepkd]: Just wondering why $aohoaoh[0]->{'foo '}[0]->{'bar'} would be difficult to read and understand?

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (12)
As of 2016-12-06 13:51 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (105 votes). Check out past polls.