in reply to Re: How to read from a file instead from a hard coding list.
in thread How to read from a file instead from a hard coding list.
my @words = `cat /path/to/file`
Are you sure the OP uses some kind of unix? Windows has no cat command out of the box. And by the way: Why spawn a new process to read a file when perl can read the file without assistance? File::Slurp does a nice job.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to read from a file instead from a hard coding list.
by JavaFan (Canon) on Apr 25, 2012 at 10:49 UTC |