Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Grep Pattern

by rsFalse (Friar)
on Dec 14, 2018 at 21:36 UTC ( #1227273=note: print w/replies, xml ) Need Help??


in reply to Re: Grep Pattern
in thread Grep Pattern

Similar idea:
#!/usr/bin/perl # https://perlmonks.org/?node_id=1227147 use warnings; use strict; my $pattern = 'FTTF'; my $repeated_pattern = $pattern x ( 1 + ( map $_, 0 .. 12 ) / length $ +pattern ); my @result = grep { $repeated_pattern =~ /./g; $& eq 'T' } 0 .. 12; print $repeated_pattern, "\n"; print "@result\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1227273]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2019-12-06 12:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (155 votes). Check out past polls.

    Notices?