CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
#!/usr/bin/perl -p0777

 



augg05
New User

Nov 1, 2013, 1:19 PM

Post #1 of 2 (889 views)
#!/usr/bin/perl -p0777 Can't Post

Hi everyone,

I need to parse through an html file and I was recommended to use -p0777 to loop thru the file without using a while(<>). I am trying to use it to open a file, but it fails to read it. If anyone familiar with this format could post an example of how to use it? it will be highly appreciated. Thanks!

This is an example of the file that I am trying to read:

open(FILE, "/pub/dir1/somefile") or die "Can't read file:$!\n";


FishMonger
Veteran / Moderator

Nov 1, 2013, 1:47 PM

Post #2 of 2 (888 views)
Re: [augg05] #!/usr/bin/perl -p0777 [In reply to] Can't Post

-p0777 would be used if you're writing a one liner. Since you're writing a script and opening a filehandle to the html file, you would not (normally) use -p0777. My recommendation is to use a normal while loop.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives