Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my  $eqn  = '$profit=$sales-$cogs';
    my  @wrds =  split /(=|-)/, $eqn;
    dd \@wrds;
    
  2. or download this
    23:13 >perl 1596_SoPW.pl
    ["\$profit", "=", "\$sales", "-", "\$cogs"]
    
    23:13 >