dakotas has asked for the wisdom of the Perl Monks concerning the following question:
And the file "file.txt" contains:#!/usr/bin/perl -w $ID="1234"; open(FILE,"<file.txt"); while(<FILE>) { print; close(FILE); exit 0;
This is a text file. My ID number is $ID.
When printing out that line, it prints out '$ID' instead of evaluating the variable. How to get the variable to be evaluated? This is eluding me for some reason.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Eval'ed data loaded from a file?
by chromatic (Archbishop) on Dec 28, 2000 at 01:46 UTC | |
by dakotas (Initiate) on Dec 28, 2000 at 01:51 UTC | |
|
Re: Eval'ed data loaded from a file?
by chipmunk (Parson) on Dec 28, 2000 at 01:48 UTC |