| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I am trying to open Internet explorer from within Perl.I have used the following code: #!/usr/bin/perl;open(MYFILE,"C:\Program Files\Internet Explorer.exe"); Any help would be appreciated. Paul |
|
#2
| |||
| |||
| 2008/9/8 Adams Paul <adams787@msn.com>: > > I am trying to open Internet explorer from within Perl.I have used the following code: > > > > #!/usr/bin/perl;open(MYFILE,"C:\Program Files\Internet Explorer.exe"); If you call an external program in Perl, shouldn't use "open". Instead you could say "system (external_program)" if this is under Unix. For your purpose, if you just want to open the web pages, you could have many choices rather than trying to open an IE. see these modules: WWW::Mechanize LWP::UserAgent etc. |
|
#3
| |||
| |||
| 2008/9/8 Jeff Pang <Jeffrey@aolchina.com>: > 2008/9/8 Adams Paul <adams787@msn.com>: >> #!/usr/bin/perl;open(MYFILE,"C:\Program Files\Internet Explorer.exe"); > > If you call an external program in Perl, shouldn't use "open". adjust: I mean shouldn't use open directly like this way. but you could open a pipe for an external command, like: open HD, "ls -l|" or die $!; while(<HD>) { print; } close HD; this is the same as: system("ls -l"); |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.