Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How can I get the results in a text file from counting in a string?

by kennethk (Abbot)
on Aug 07, 2012 at 17:39 UTC ( #986041=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    $str="BATCATDATEFEAT";
    $A=0;$T=0;
    ...
    print RESULT "\n T=$T ends at ",pos $str,"\n";}
    close(RESULT);                    # Line 17  
    exit;
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    
    ...
       $T++;
       print $fh "\n T=$T ends at ",pos $str,"\n";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://986041]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-07-27 16:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (418 votes). Check out past polls.