wylie has asked for the wisdom of the Perl Monks concerning the following question:
results in this error message:#!/usr/bin/perl -w use strict; use diagnostics; for (</home/www/*/logs/weekly>); my $a=$_; substr($a,-7)=" "; print $a;
Can't use string ("/home/www/xyz/logs/weekly") as a symbol ref while " +strict refs" in use at lr15.pl line 16 (#1) (F) Only hard references are allowed by "strict refs". Symbolic references are disallowed. See perlref. Uncaught exception from user code: Can't use string ("/home/www/xyz/logs/weekly") as a symbol ref whi +le "strict refs" in use at lr15.pl line 16.
How can I get around this problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Symbolic reference problem
by Cine (Friar) on Aug 20, 2001 at 14:47 UTC | |
by dragonchild (Archbishop) on Aug 20, 2001 at 16:42 UTC | |
|
Re: Symbolic reference problem
by mirod (Canon) on Aug 20, 2001 at 14:28 UTC | |
by Hofmator (Curate) on Aug 20, 2001 at 14:57 UTC | |
by mirod (Canon) on Aug 20, 2001 at 15:17 UTC |