in reply to script assistance please
Some more less or more useful little hints:
Useful pragmas:
use strict; use warnings; use feature qw(say); use Data::Dump;
Split (if you really need it):
my $moyr = "12/2014"; my ( $month, $year ) = split /\//, $moyr; say for ( $month, $year );
Building the hash:
my %csga; while (<$in>) { my @record = split /\t/; chomp @record; $csga{ $record[0] } = $record[1]; } close $in; dd \%csga;
Skipping headers when reading a file:
open( my $in, "<", q(cc.txt) ) || die $!; while (<$in>) { next if $. <= 8; # print; } close $in;
Best regards, Karl
«The Crux of the Biscuit is the Apostrophe»
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: script assistance please
by Laurent_R (Canon) on Feb 20, 2015 at 20:03 UTC | |
by RonW (Parson) on Feb 20, 2015 at 21:14 UTC | |
by karlgoethebier (Abbot) on Feb 21, 2015 at 17:55 UTC |