in reply to Re: Counting iterations of 1 and 0
in thread Counting iterations of 1 and 0
Sorry about my indention error guys, it made sense to me.
I tested that code Bloodnok Here is what I made it into..
use warnings; use strict; use autodie; open IN, "<baseline_pattern.txt"; binmode IN; my @content = <IN>; close IN; foreach my $num (keys %rec) { my @count = ("@content" =~ /$num+/sg); open my $fh, ">iterations$num.txt"; print "$_\n" for @count; close $fh; }
And here is the error message.
Global symbol "%rec" requires explicit package name at D:\iterations counter.pl
Line 10.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Counting iterations of 1 and 0
by Bloodnok (Vicar) on Feb 03, 2014 at 13:52 UTC | |
by AwsedreswA (Initiate) on Feb 04, 2014 at 08:19 UTC | |
by Bloodnok (Vicar) on Feb 04, 2014 at 17:52 UTC | |
by AwsedreswA (Initiate) on Feb 05, 2014 at 01:22 UTC |