N
new2perl
Assigning a variable.
Then reading in text file that uses the variable.
It's isn't resolved.
Input file:
Your name is: $name
Script:
#!/bin/perl
$name="Rupert";
$text="textin";
open (MYFILE, $text) or die "cant open erik";
while (<MYFILE>) { $value = $_ }
print "$value";
Output:
Your name is: $name
Output that I want:
Your name is Rupert.
What am I doing wrong here ?
Bob
Then reading in text file that uses the variable.
It's isn't resolved.
Input file:
Your name is: $name
Script:
#!/bin/perl
$name="Rupert";
$text="textin";
open (MYFILE, $text) or die "cant open erik";
while (<MYFILE>) { $value = $_ }
print "$value";
Output:
Your name is: $name
Output that I want:
Your name is Rupert.
What am I doing wrong here ?
Bob