use strict; use warnings; use Data::Dumper; my @slot; my $dpdrivloc = "MSL6000 Trinity"; my $regex = qr/\Q$dpdrivloc\E:\s*(\d+)/; # ... open DPSLOTFILE ... while ( <DPSLOTFILE> ) { if (my ($numb) = $_ =~ $regex) { push @slot, $numb; } } print Dumper \@slot;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: $1 into an array
by jeffa
in thread $1 into an array
by jamen_98
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |