Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Help:getting parts of the strings from a file into managable variables

by tmoertel (Chaplain)
on Nov 11, 2004 at 23:27 UTC ( [id://407220]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Help:getting parts of the strings from a file into managable variables
in thread Help:getting parts of the strings from a file into managable variables

To make my code easier to read, I indent it by four spaces when I quote it. (That way, it doesn't get lost in the surrounding flow of text.) As a result, you'll need to unindent it (or at least the __DATA__ portion) before running it.

Try processing the script through this one liner to remove the leading four spaces:

perl -i.bak -pe's/^ //' the-script.pl # unindent the-script.pl
That ought to do it.

Cheers,
Tom

Replies are listed 'Best First'.
Re^4: Help:getting parts of the strings from a file into managable variables
by my_perl (Initiate) on Nov 12, 2004 at 17:53 UTC
    Hi, thanks again:) what would i need to change if i had spaces before these strings,number of spaces is not constant. Thanks Aida

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 17:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found