Click to See Complete Forum and Search --> : perl script to read from a file and put in a scalar variable


rag84dec
December 4th, 2008, 07:23 AM
Hi,
I need to read the content of a file data.txt

dat
data1


into a variable...@temp.
I am getting both the values in $temp[0]...

can anyone help me??..

else i want it in a scalar variable like
$temp1= dat:data1 ---something like this...delimited by a delimiter...

can anyone help me??

PeejAvery
December 4th, 2008, 08:40 AM
You could easily have searched the Google or any other engine for this topic.

http://www.perlfect.com/articles/perlfile.shtml