jeanluca, this will work
open (IN, "<", "myFile") or die "Cannot open: myFile: $!\n"; ; { local $/; $str = <IN>; print "$str\n"; } close IN ;
Also there is a module Slurp to do this.
Prasad
In reply to Re: put file content into a string
by prasadbabu
in thread put file content into a string
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |