Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: Simple Pass By Reference

by sk (Curate)
on Jul 26, 2005 at 00:57 UTC ( [id://478038]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Simple Pass By Reference
in thread Simple Pass By Reference

Wouldn't this be considered to be semi-alias? Well you create one more variables but still does not have the "contents" as it is still a pointer/reference. So memory is OK here?

sub alter_var { my $aliasvar = $_[0]; # Nice to have C like proto types but... ${$aliasvar} =~ s/a/b/g; # ${$_[0]} =~ s/a/b/g; # This uses $_[0] and works }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found