Re: File Handles in subroutines

2003-06-25 Thread John W. Krahn
Kevin Pfeiffer wrote: > > Hi John, Hello, > In article <[EMAIL PROTECTED]>, John W. Krahn wrote: > [...] > > perldoc -q filehandle > > > > [snip] > > Hmmm... lots to digest here. One question. An example mentioned is: > > >As of perl5.6, open() autovivifies file and direcĀ­ >

Re: File Handles in subroutines

2003-06-25 Thread Kevin Pfeiffer
Hi John, In article <[EMAIL PROTECTED]>, John W. Krahn wrote: [...] > perldoc -q filehandle > > Found in /usr/lib/perl5/5.6.0/pod/perlfaq5.pod >How do I flush/unbuffer an output filehandle? Why must I >do this? > >How can I make a filehandle local to a subroutine? How d

Re: File Handles in subroutines

2003-06-25 Thread John W. Krahn
Joshua Scott wrote: > > What do I need to do in order to use a filehandle that was opened earlier in > a program within a subroutine? perldoc -q filehandle Found in /usr/lib/perl5/5.6.0/pod/perlfaq5.pod How do I flush/unbuffer an output filehandle? Why must I do this? How

RE: File Handles in subroutines

2003-06-25 Thread Kipp, James
> > > What do I need to do in order to use a filehandle that was > opened earlier in > a program within a subroutine? I've included an example of > the code I have > that is not doing what I would like. Basically, I never get > any output to > the file. If I change it so that it doesn't use

Re: File Handles in subroutines

2003-06-25 Thread Sudarshan Raghavan
Scott, Joshua wrote: What do I need to do in order to use a filehandle that was opened earlier in a program within a subroutine? I've included an example of the code I have that is not doing what I would like. Basically, I never get any output to the file. If I change it so that it doesn't use

RE: File Handles in subroutines

2003-06-25 Thread Gupta, Sharad
Did open ever succeeded?? Check with: open(FILE,">>$logfile") or die "$!"; -sharad -Original Message- From: Scott, Joshua [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 11:13 PM To: [EMAIL PROTECTED] Subject: File Handles in subroutines What do I need to do in order t

Re: file handles!

2002-10-09 Thread Steve Grazzini
Jean Padilla <[EMAIL PROTECTED]> wrote: > Hi, pravesh > 1 - You are saying "mv < 2 - a file handle is *not* to be confused with a file name Actually - Perl will let you do our $FH = 'path'; open FH or die...; # open FH, '<', $FH Doesn't work with 'my' variables, though. > try : > > my $f

Re: file handles!

2002-10-09 Thread Jean Padilla
Hi, pravesh 1 - You are saying "mv < > HI > I define a file the following way: > > $FILE_HANDLE = "< > then I openit > > open(FILEHANDLE); > > i perform some operations.. > > and then I want to transfer this "somefile" to some other directory > > but I am not able to use mv comand to do i

RE: file handles in cgi

2002-04-03 Thread David Gray
> > this is the perl script : abc.pl(say) -- this is in my cgi-bin... > > > > #!/usr/bin/perl > > print "content-type: text/html\n\n"; > > You need to print html headers when you're printing to a browser, i.e. > > print "Content-type:text/html\n\n"; > > -dave I must be blind this morning...

RE: file handles in cgi

2002-04-03 Thread David Gray
> this is the perl script : abc.pl(say) -- this is in my cgi-bin... > > #!/usr/bin/perl > print "content-type: text/html\n\n"; > > open (IN, ">abc.txt"); > $x = ($inputs{name}); > print IN $x; > close (IN); > > open (IN, "abc.txt"); > @arr = ; > print @arr; > close (IN); > > and this is th

Re: File Handles as arguments...

2001-06-11 Thread Paul
--- Mike Breeze <[EMAIL PROTECTED]> wrote: > -- Original Message -- > From: "Evgeny Goldin (aka Genie)" <[EMAIL PROTECTED]> > > > >> CODE 3: > >> printit(*Some_Handle); > > > >> CODE 4: > >> printit(\*Some_Handle); > > > > > >If you're choosing betw

Re: File Handles as arguments...

2001-06-11 Thread Mike Breeze
-- Original Message -- From: "Evgeny Goldin (aka Genie)" <[EMAIL PROTECTED]> > >> CODE 3: >> printit(*Some_Handle); > >> CODE 4: >> printit(\*Some_Handle); > > >If you're choosing between those two - CODE 4 looks better as it passes >the reference to

Re: File Handles as arguments...

2001-06-11 Thread Evgeny Goldin (aka Genie)
> CODE 3: > printit(*Some_Handle); > CODE 4: > printit(\*Some_Handle); If you're choosing between those two - CODE 4 looks better as it passes the reference to typeglob instead of the typeglob itself and passing references is always the better way to do things. CODE 4 is a usual way fo