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

Re: local element of my() array????

by extremely (Priest)
on Feb 19, 2003 at 06:22 UTC ( #236556=note: print w/ replies, xml ) Need Help??


in reply to local element of my() array????

Try this one:

#!/usr/bin/perl -w use strict; my @k = (1..9); my $m; { local $k[5]="middle"; $m = \@k; print "@k\n"; my $m = [ 'a'..'z' ]; print "@$m\n"; } print "@$m\n"; ## Returns: #1 2 3 4 5 middle 7 8 9 #a b c d e f g h i j k l m n o p q r s t u v w x y z #1 2 3 4 5 6 7 8 9

Pretty ugly, huh?

--
$you = new YOU;
honk() if $you->love(perl)


Comment on Re: local element of my() array????
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2015-07-28 07:32 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 (253 votes), past polls