Help for this page

Select Code to Download


  1. or download this
    Sample Data:
    Car Red 100
    Car Black 100
    Car Yellow 100
    Bus Green 400
    Truck Blue 300
    
  2. or download this
    open (FILE, 'test.txt') or die "$!\n";
    my @line = <FILE>;
    ...
       my($car, $color, $amount) = split(/ /, $line);
       print "$car $color $amount\n";
    }