Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: subroutine help

by Kenosis (Priest)
on Nov 29, 2012 at 08:22 UTC ( #1006194=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    'Co' => 58.933195
    
    ...
    my $mult = $2 || 1;
    $weight += ($eweight*$mult);
    print STDERR "Adding $1 ($eweight)* $mult\n";
    
  2. or download this
    Adding Co (58.933195)* 1
    Adding C (12)* 1
    Adding O (16)* 2
    Molecule: Co C O2
    Weight of Co C O2 : 102.933195
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006194]
help
Chatterbox?
[sierpinski]: What does this do? my $j = $#$list;
[sierpinski]: I've never seen $#$var before.
[LanX]: $list cops be an array ref
[LanX]: could
[LanX]: $#array gives the length
[LanX]: no sorry ...
[sierpinski]: so that would just be deferencing it...
[LanX]: the last index!
[LanX]: yes
[sierpinski]: yeah I guess $list is a reference.. yeah

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2017-12-13 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (369 votes). Check out past polls.

    Notices?