J
Jeremy Billones
I know very little about perl. (Just wanted to get that out of the way
I've been handed a script that, at first, does essentially the following:
$tmpldir="(directory with template files)"
$scriptdir="(some directory)"
opendir (DIR,$tmpldir)
while (defined($file=readdir DIR))
open (FILE, "$tmpldir/$file")
($newfile,$ext) = split/\./, $file)
$newfile = $newfile . "(new ext)"
open (NEWFILE, "> $varhash{'scriptdir'}/$newfile")
The problem is that whenever the script calls $varhash, it generates
null output.
print "$scriptdir" gives me the expected output
print "$varhash{'scriptdir'}" gives me nothing
I can't go through the entire script and replace all the uses of varhash,
I have to make it work.
What should I look to do?
Thanks in advance.
--
Jeremy Billones
"It's a place used the world over where people can come together to bitch about
movies and share pornography together." This is a much more sophisticated idea
of the Net than we find in high-tech cyberthrillers, where the Net is a place
that makes your computer beep a lot. - Roger Ebert on "Jay & Silent Bob..."
I've been handed a script that, at first, does essentially the following:
$tmpldir="(directory with template files)"
$scriptdir="(some directory)"
opendir (DIR,$tmpldir)
while (defined($file=readdir DIR))
open (FILE, "$tmpldir/$file")
($newfile,$ext) = split/\./, $file)
$newfile = $newfile . "(new ext)"
open (NEWFILE, "> $varhash{'scriptdir'}/$newfile")
The problem is that whenever the script calls $varhash, it generates
null output.
print "$scriptdir" gives me the expected output
print "$varhash{'scriptdir'}" gives me nothing
I can't go through the entire script and replace all the uses of varhash,
I have to make it work.
What should I look to do?
Thanks in advance.
--
Jeremy Billones
"It's a place used the world over where people can come together to bitch about
movies and share pornography together." This is a much more sophisticated idea
of the Net than we find in high-tech cyberthrillers, where the Net is a place
that makes your computer beep a lot. - Roger Ebert on "Jay & Silent Bob..."