The stupid question is the question not asked | |
PerlMonks |
Compile error for the perl codeby unnik (Initiate) |
on Dec 17, 2007 at 05:32 UTC ( [id://657372]=perlquestion: print w/replies, xml ) | Need Help?? |
unnik has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, I am getting the following compile error ----------------------------------------------- Bareword found where operator expected at do-bld3.pl line 2045, near "if ( $me3400(1) eq /cp" (Might be a runaway multi-line // string starting on line 2000) (Do you need to predeclare if?) Backslash found where operator expected at do-bld3.pl line 2045, near "mz \" (Do you need to predeclare mz?) syntax error at do-bld3.pl line 2045, near "if ( $me3400(1) eq /cp me340x" syntax error at do-bld3.pl line 2052, near "} else" syntax error at do-bld3.pl line 2063, near "}" -------------------------------------------------- Its showing for below piece of code..can u please help in debug. ======= if ($s1 == "j") { $log = "\/users\/$u\/me3400-log.txt"; open(FILE, $log) || die "cud not read $log"; while(<FILE>) { if ( $me3400(1) == /cp me340x-metrobase-mz \/tftpboot\/$u\/me340x-metrobase-mz/ ) { open(OUTFILE,">>$of1") || die "cud not write"; print OUTFILE "me340x-metrobase-mz\n"; close(OUTFILE); return; } else { open(OUTFILE,">>$of2") || die "cud not write"; print OUTFILE "me340x-metrobase-mz\n"; close(OUTFILE); return; } } #end of while for me3400 log } ### end of if if ($s1 == "j") thanks Unni
Back to
Seekers of Perl Wisdom
|
|