in reply to array - separating elements in a 3-column list
Split will seperate $_ on whitespace if given no arguments,
The empty spaceship op takes care of opening and reading files from @ARGV. If no files are given, it will read from STDIN until Ctrl-D or eof.#!/usr/bin/perl # file: foo.pl # Usage: ./foo.pl /path/to/data.d use warnings; use strict; while (<>) { my ($foo, $bar, $baz) = split; # do stuff with them } # report results
After Compline,
Zaxo
|
|---|