Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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?
[karlgoethebier]: My perltidy adds a semicolon after .... How can i avoid this?
[LanX]: ellipse aka ... aka yadda yadda is a new command
[LanX]: sopw!
[1nickt]: Sorry kgb can't help there, not a perltidy user.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2017-11-18 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?