CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [Stefanik] Match string in multi-line file: Edit Log



Laurent_R
Veteran / Moderator

Dec 30, 2012, 10:42 AM


Views: 4471
Re: [Stefanik] Match string in multi-line file

You have two errors on this line:


Code
$FileTemp="x"


First, you should use "my" to declare $FileTemp as a lexical (local) variable. Second, you forgot the closing semi-colon at the end. So it should be:


Code
my $FileTemp="x" ;


Once you have this correct, you no longer need the awkward "$main::" to prefix $FileTemp of your last attempt.

(Note: my comments are not really on your last post, but rather on the previous one. In the last post, you commented out important lines so that you are even further away from an actual solution.)


(This post was edited by Laurent_R on Dec 30, 2012, 10:45 AM)


Edit Log:
Post edited by Laurent_R (Veteran) on Dec 30, 2012, 10:43 AM
Post edited by Laurent_R (Veteran) on Dec 30, 2012, 10:45 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives