ritz0 has asked for the wisdom of the Perl Monks concerning the following question:
I can’t ingest an html file under mac 10.6.4 The first line is all that is read;
*!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"*Essentially, I am reading in an ARG[0] of where the file is (an option in terminal), but the scalar variable can not hold the whole page in memory.
#!/usr/bin/perl use strict; use warnings; use diagnostics; my $fileloc = $ARGV[0]; chomp $fileloc; open(HANDLE,"$fileloc") or die "cannot open file: $!"; my $content = <HANDLE>; close(HANDLE); print "$content\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mac file problem
by Kenosis (Priest) on Mar 16, 2013 at 23:37 UTC | |
|
Re: mac file problem
by 7stud (Deacon) on Mar 17, 2013 at 06:22 UTC |