in reply to Last Character into Array
use strict; use warnings; my $file = 'foo.txt'; open my $fh, $file or die "$file: $!"; my @array; while (<$fh>) { push @array, $1 if /(\d+)$/; } close $fh; print "@array\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Last Character into Array
by anonymized user 468275 (Curate) on Apr 26, 2011 at 13:08 UTC |