Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use feature qw(say);
- use strict;
- use warnings;
- my @abc = ('1234.txt', '2345.txt', '3456.txt', '4567.txt');
- my @xyz;
- for my $abc (@abc) {
- my ($prefix) = $abc =~ /(\d*).txt/;
- say "$prefix";
- push @xyz, $prefix;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement