good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: put file content into a stringby ptum (Priest) |
on Dec 19, 2005 at 16:14 UTC ( [id://517776]=note: print w/replies, xml ) | Need Help?? |
First, you don't seem to check to see if the open works. This seems a critical flaw. Try something like this:
Second, you will only get the first line of the file, unless you muck with the record separator. You may want to append to your $str variable inside a while loop. Hope that helps. :) No good deed goes unpunished. -- (attributed to) Oscar Wilde
In Section
Seekers of Perl Wisdom
|
|