For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > December 2006 > Re: [PBML] Perl equivalent of PHP extract()?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PBML] Perl equivalent of PHP extract()?
Randal L. Schwartz

2006-12-17, 9:59 pm

>>>>> "Kelly" == Kelly Jones <kelly.terry.jones@gmail.com> writes:

Kelly> Inside a subroutine, I want to use this hash:
Kelly> %hash = ("apple" => "red", "pear" => "green", "le@!mon" => "yellow");

Kelly> to set my($apple)="red", my($pear)="green", my($lemon)="yellow"
Kelly> [getting rid of the junk '@' and '!' chars in the key]

You really really *don't* want to do that.

If PHP has a function to do that easily, no wonder there's so many security
holes reported with PHP scripts.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com