Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

my $1

by mltucker (Initiate)
on Apr 23, 2009 at 19:53 UTC ( #759641=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    print diff(shift)."\n";
    ...
        return diff($1)."+".diff($2) if m/(.+?)\+(.+);
        ... # other differentiation rules here
    }
    
  2. or download this
    ...
    if (m/(.+?)\+(.+))
    my $firstTerm = $1;
    my $secondTerm = $2;
    return diff($firstTerm)."+".diff($secondTerm);
    
  3. or download this
    sub diff
    {
        my $_=shift; my $1; my $2;
        ...
    }
    
  4. or download this
    Can't use global $1 in "my"...
    Execution ... aborted due to compilation errors.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://759641]
Approved by Corion
help
Chatterbox?
and the rats come out to play...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2018-07-21 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (443 votes). Check out past polls.

    Notices?