in reply to Grep Pattern
#!/usr/bin/perl -l # https://perlmonks.org/?node_id=1227147 use strict; use warnings; my $pattern = '011'; my @result = grep $pattern =~ /./g && $&, 0..12; local $, = ','; print @result;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Grep Pattern
by choroba (Cardinal) on Dec 12, 2018 at 15:26 UTC | |
by tybalt89 (Monsignor) on Dec 12, 2018 at 15:41 UTC | |
by rsFalse (Chaplain) on Dec 15, 2018 at 20:43 UTC | |
Re^2: Grep Pattern
by rsFalse (Chaplain) on Dec 14, 2018 at 21:36 UTC |
In Section
Seekers of Perl Wisdom