Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Removing leading whitespace from a file?

by Juerd (Abbot)
on Jul 09, 2002 at 05:44 UTC ( #180419=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Tie::File;
    tie @file, 'Tie::File', 'test.txt';
    s/^\s+// for @file;
    
  2. or download this
    perl -i -pe's/^\s+//' test.txt
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2023-01-31 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?