Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: regular expessions question: (replacing words)

by jwkrahn (Abbot)
on Sep 27, 2010 at 14:34 UTC ( [id://862224]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $FILENAME4 = "organized.txt";
    open(DATA2, $FILENAME4);
    
  2. or download this
    my $FILENAME4 = "organized.txt";
    open DATA2, '<', $FILENAME4 or die "Cannot open '$FILENAME4' $!";
    
  3. or download this
    #remove all previous re-organized files
    my $remove_reorganized = "re-organized.txt";
    ...
                print "Cannot open file \"$outputfile\" to write to!!\n\n"
    +;
                    exit;
            }
    
  4. or download this
    # make a file for the ouput
    my $outputfile = "re-organized.txt";
    open POS, '>', $outputfile or die "Cannot open file '$outputfile' to w
    +rite to because: $!";
    
  5. or download this
    $organized =~ s/(\w+)[^(^\d+)(\s)]/z/g;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2024-04-23 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found