Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: my $1

by mltucker (Initiate)
on Apr 23, 2009 at 21:26 UTC ( #759674=note: print w/ replies, xml ) Need Help??


in reply to Re: my $1
in thread my $1

Thanks for the reply.

Ok, so could I use local for $1 and $2 in the same way that I use my for $_? This isn't working how I expected it to.

I'm not sure if this is relevant, but the one that I'm having trouble with is the multiplication, where I use both the originals and the recursive call results:

return "($1)*(".diff($2).")+($2)*(".diff($1).") if m/(.+?)\*(.+)/;

This works fine using $capt1 = $1, but I'm curious as to whether it can be done using local or with the double quotes...

-Mark


Comment on Re^2: my $1
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2015-07-05 14:07 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 (67 votes), past polls