Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Help with PHP-to-Perl CPAN bundle

by erikharrison (Deacon)
on Sep 30, 2004 at 15:05 UTC ( #395371=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Help with PHP-to-Perl CPAN bundle
in thread Help with PHP-to-Perl CPAN bundle

$key, $value are copies of the values in the hash. The => operator can be used in PHP to create aliases to the elements, so changing $value is the same as changing $hash{$key} (to use Perlish syntax). So, in PHP:

$array = (0,1,2,3,4,5); for ($array => $a, $b, $c) { $c = 'two'; } print ($array[2]) #Prints 'two'
Cheers,
Erik

Light a man a fire, he's warm for a day. Catch a man on fire, and he's warm for the rest of his life. - Terry Pratchet


Comment on Re^3: Help with PHP-to-Perl CPAN bundle
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2015-07-30 23:57 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 (273 votes), past polls