pinnacle has asked for the wisdom of the Perl Monks concerning the following question:
I keep getting the error message as updated in TITLE. Please assist !!
Part of code where I am getting error is undermentioned
`cd; pwd > tmp; cp tmp figs/Com/dis/tmp`; my $con = `cat tmp`; if ($con =~ m/^\/(\w+)\/(\w+)$/){ # print "$1,$2"; open(RESULT,'>> /$1/$2/figs/Com/dis/result.xml' or die "c +ouldn't open: $!"); } select(RESULT);
I am getting undermentioned error
Useless use of a constant in void context at ./test.pl line 47. Can't use string (">> /$1/$2/figs/Com/dis") as a symbol ref while "str +ict refs" in use at ./test.pl line 47.
My understanding is somehow it's not taking /$1/$2 in the file path, but I need that what should I do !!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't use string (">> /$1/$2/figs/Com/dis") as a symbol ref while "strict refs" in use
by CountZero (Bishop) on May 03, 2011 at 06:31 UTC | |
|
Re: Can't use string (">> /$1/$2/figs/Com/dis") as a symbol ref while "strict refs" in use
by tchrist (Pilgrim) on May 03, 2011 at 04:18 UTC | |
|
Re: Can't use string (">> /$1/$2/figs/Com/dis") as a symbol ref while "strict refs" in use
by John M. Dlugosz (Monsignor) on May 03, 2011 at 05:49 UTC | |
|
Re: Can't use string (">> /$1/$2/figs/Com/dis") as a symbol ref while "strict refs" in use
by wind (Priest) on May 03, 2011 at 00:46 UTC | |
by tchrist (Pilgrim) on May 03, 2011 at 05:41 UTC | |
by wind (Priest) on May 03, 2011 at 09:55 UTC |