in reply to Re: 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

Hi, THank you so much for a prompt response :) I cut and pasted your response, and it does not work for me. It gives result that every line is bad. and VAR1{} any idea why? Thanks one more time.
  • Comment on Re^2: Help:getting parts of the strings from a file into managable variables

Replies are listed 'Best First'.
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
    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

      Hi, thanks again:) what would i need to change if i had spaces before these strings,number of spaces is not constant. Thanks Aida