in reply to Need help with s///

I have an even better idea. Why create a string with text, and then remove it? Just by default have the string as "parameter".

Replies are listed 'Best First'.
RE: Re: Need help with s///
by Tii (Monk) on Jul 15, 2000 at 19:22 UTC
    I mentioned in my reply to ZZamboni that I was testing a program in which I was reading data from a config file. I created the string with text to simulate what I was reading from the file.

    I decided a different approach:
    I created a text file with the line $$NETOBJ.parameter in it. Then I changed my code to the following:

    #!/usr/local/bin/perl open (F, "textfile") or die "Could not open file: $!"; $a = <F>; $a =~ s/\$\$NETOBJ\.//; print $a;
    This code outputs parameter. It turns out that the way I was simulating reading text from a file was part of my problem.
    Thanks to everyone for the help.

    Humbly,
    Tii