Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Uer Perl Variable in file

by vinaybond (Novice)
on Aug 06, 2012 at 14:40 UTC ( #985742=note: print w/ replies, xml ) Need Help??


in reply to Re: Uer Perl Variable in file
in thread Uer Perl Variable in txt file

I have a file which has contents like this

______file.txt_______
I am $name
I am from $city
I live $food
I got $car


Using perl code I am reading line one by one from file.txt. When I print line using $_ it does not replace variable in text file with variable values in .pl file but it prints the line as it is.
-Vinay


Comment on Re^2: Uer Perl Variable in file

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985742]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-12-20 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls