Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Grep Pattern

by rsFalse (Chaplain)
on Dec 14, 2018 at 21:36 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1227273]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2024-04-19 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found