Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

RE: (jjhorner)replacing values via web

by le (Friar)
on Jul 18, 2000 at 16:21 UTC ( [id://22977]=note: print w/replies, xml ) Need Help??


in reply to (jjhorner)replacing values via web
in thread replacing values via web

Just a dumb question:

Will a substitution on $_ find its way into the array? (Will the array contents get changed when one changes $_?)

Replies are listed 'Best First'.
RE(2) (jjhorner) replacing values via web
by nuance (Hermit) on Jul 18, 2000 at 16:59 UTC
    Yes it will since the array element is an lvalue.

    From perlsyn:

    If any element of LIST is an lvalue, you can modify it by modifying VAR inside the loop. That's because the foreach loop index variable is an implicit alias for each item in the list that you're looping over.

    Nuance

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2025-02-08 02:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (95 votes). Check out past polls.