open (FAILEHANDLER, ">>$filename") what is the rong with that


Dear perl experts, I used to use[ open (FAILEHANDLER, ">>$filename");] to open and add new lines to $filename, but it didn't work any more. The perl version is 5.8.1. When I try [ open (FAILEHANDLER, ">$filename");] it's work but the ...
Posted On: Monday 26th of November 2012 08:53:38 PM Total Views:  144
View Complete with Replies

RELATED TOPICS OF Perl PROGRAMMING LANGUAGE




IPC::open3: What goes wrong?

netties, I try to run a simple UNIX-command using IPC: pen and want to get the command line's STDOUT, STDERR and the return code of the command using the following: cat script.pl #!/usr/bin/perl # use IPC::Open3; open3 (\*WRT, \*OUT, ...
VIEWS ON THIS POST

36

Posted on:

Thursday 15th November 2012
View Replies!

using "opendir" through a CGI script on Apache

Greetings all, I'm trying to use the "opendir" command on Win32 in a CGI script. I'm using Apache 2.0.48 for Win32. The "openDir" command works from the CGI script when I try to open a folder located on my local ...
VIEWS ON THIS POST

59

Posted on:

Thursday 15th November 2012
View Replies!

Question about the IO::File->open method

The IO::File module has the open method that you use to open a file. It returns a filehandle. You can use this IO::File->open to open a file in different modes - 1) by the PERL mode: $fh = new IO::File ...
VIEWS ON THIS POST

28

Posted on:

Monday 19th November 2012
View Replies!

open with encoding(utf8) takes forever

I'm trying to open a utf-8 file with a long line, 2000 characters or so. It works with the top method, but the second method gags when it hits the long line: open FILE, "gc.html"; open FILE, '<:encoding(utf8)', "gc.html"; ...
VIEWS ON THIS POST

48

Posted on:

Monday 19th November 2012
View Replies!

LDAP_STRONG_AUTH_REQUIRED sasl issue with open ldap.

Here is my prg:::: use Net::LDAP qw(LDAP_SUCCESS LDAP_PROTOCOL_ERROR); use Authen::SASL; use Net::LDAP::Util qw(ldap_error_name ldap_error_text); sub lConnect { my $server = shift; print " the server name is $server\n"; my $ldap = Net::LDAP->new($server, port=> 389, version => 3); print "=== The ...
VIEWS ON THIS POST

66

Posted on:

Monday 19th November 2012
View Replies!

opendir example missing

Here I am at home, on my Active State Perl 5.8.0. The perldoc for opendir is missing an example of its use. I have to go to readdir to find an example of opendir, though opendir lists 5 other functions ...
VIEWS ON THIS POST

39

Posted on:

Monday 19th November 2012
View Replies!

FAQ 8.23 How can I open a pipe both to and from a command?

This is an excerpt from the latest version perlfaq8.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest ...
VIEWS ON THIS POST

49

Posted on:

Monday 19th November 2012
View Replies!

Example for open3 on windows?

, I tried to forward input, output and error of a command to files using open3 on windows. I used the following code: open(F_IN, "<$f_in"); open(F_OUT, ">$f_out"); open(F_ERR, ">$f_err"); my $pid = open3(\*F_IN, \*F_OUT, \*F_ERR, "$command"); waitpid($pid, 0); Anything, this ...
VIEWS ON THIS POST

39

Posted on:

Sunday 25th November 2012
View Replies!

My tk app loses focus when opened: BrowseEntry widget?

this is a minor but strange and irritating problem. When I open my tk app in Windows, it loses "focus," meaning it is not the active, foreground window. The app works fine if I click on it and bring ...
VIEWS ON THIS POST

69

Posted on:

Sunday 25th November 2012
View Replies!

" or trailing blanks?" style="color:#1385b4;text-transform:uppercase;" name="Post_239753"> FAQ 5.18 How can I open a file with a leading ">" or trailing blanks?

This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest ...
VIEWS ON THIS POST

36

Posted on:

Sunday 25th November 2012
View Replies!

Using IPC::open2 under mod_perl

Hi mod_perl gurus, the following piece of code works well under a normal cgi: local(*META, *HIS_IN); # Create local handles if needed. $childpid = open2(\*META, \*HIS_IN, $queryString) or print STDERR "can't open pipe $queryString $!"; while ($line=){ .... } close(META); ...
VIEWS ON THIS POST

47

Posted on:

Sunday 25th November 2012
View Replies!

open() cannot run operation system commands

! I'm running ActivePerl 5.8.0.806 on a Windows 2000 with SP3 Following code when I try to execute: open(GETTHIS, " dir |"); @displaythis=; close GETTHIS; print @displaythis; I get: C:\source\perl\scripting>perl open_cmd.pl C:\source\perl\scripting> Nothing! but when I run the same code ...
VIEWS ON THIS POST

111

Posted on:

Monday 26th November 2012
View Replies!

" or trailing blanks?" style="color:#1385b4;text-transform:uppercase;" name="Post_240074"> FAQ 5.17 How can I open a file with a leading ">" or trailing blanks?

This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest ...
VIEWS ON THIS POST

34

Posted on:

Monday 26th November 2012
View Replies!

what role is + in open's file argument?

I must have known the answer to this at some point because I find it in my own code various places. But I cannot recall what it is supposed to do.. Searching this group shows many instances of its use ...
VIEWS ON THIS POST

47

Posted on:

Monday 26th November 2012
View Replies!

FAQ 9.6 How do I download a file from the user's machine? How do I open a file on another machine?

This is an excerpt from the latest version perlfaq9.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest ...
VIEWS ON THIS POST

58

Posted on:

Monday 26th November 2012
View Replies!

file.lock")?" style="color:#1385b4;text-transform:uppercase;" name="Post_240180"> FAQ 5.20 Why can't I just open(FH, ">file.lock")?

This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest ...
VIEWS ON THIS POST

20

Posted on:

Monday 26th November 2012
View Replies!

How to open temporary with Perl 5.6?

in the test suite of one of my modules I use open TMP, '+>', undef or die ... to open a temporary file which is more or less as it is documented in my Perl 5.8.8 documentation: > As ...
VIEWS ON THIS POST

88

Posted on:

Monday 26th November 2012
View Replies!

Generating Gnuplot graphs from Perl - and keeping them open

I have a Perl program that successfully executes commands in Gnuplot (importing a file and plotting) but I have one problem. I cannot figure out how to keep the graph alive. The program executes, flashes the graph I need and ...
VIEWS ON THIS POST

32

Posted on:

Monday 26th November 2012
View Replies!

Yet Another Perl Conference, North America, 2005 Registration now open

----------> Yet Another Perl Conference, North America, 2005 Registration now open. Conference dates: Monday - Wednesday 27 - 29 June 2005 Location: 89 Chestnut Street http://89chestnut.com/ University of Toronto Toronto, Ontario, Canada Info at: http://yapc.org/America Direct registration: http://donate.perlfoundation.org/ind...ference_id=423 Full registration ...
VIEWS ON THIS POST

109

Posted on:

Monday 26th November 2012
View Replies!

Another newbie question re: STDERR and IPC::open3(), nowait() and zombies

I've tried the FAQs and read the postings, but can't seem to find the magic combo. Any help out there would be greatly appreciated. I can't seem to get rid of the zombies. I'm attempting to use perldoc in a ...
VIEWS ON THIS POST

74

Posted on:

Monday 26th November 2012
View Replies!