maintainer=mailto:wjm@metronet.com Text= ###################################################################### EndText= Name=Re: How to close an unknown descriptor from a perl script Path=0/perlinfo/scripts/file-handling/close.all.fd Type=0 Text=
# File Name: close.all.fd
# File Size in BYTES: 1710
# Sender/Author/Poster: Tom Christiansen 
# Subject: Re: How to close an unknown descriptor from a perl script
# Archived: Apr 29 02:16 1994
#
# :So how can the perl script guarantee that it has closed
# :ALL descriptors.  A C program could just call close on descriptors
# :0 to n where n is big enough and ignore all errors on non-opened
# :descriptors.
# 
EndText= Text= ###################################################################### EndText= Name=Re: 'tail -f' & PERL Path=0/perlinfo/scripts/file-handling/filemonitor Type=0 Text=
# File Name: filemonitor
# File Size in BYTES: 10822
# Sender/Author/Poster: ej@id.dth.dk (Erik Johansen)
# Subject: Re: 'tail -f' & PERL
# Archived: Apr 29 02:16 1994
#
# I have written a few scripts to monitor several files on different machines
# 
EndText= Text= ###################################################################### EndText= Name=Re: filehandles and defined Path=0/perlinfo/scripts/file-handling/fileno.test Type=0 Text=
# File Name: fileno.test
# File Size in BYTES: 3414
# Sender/Author/Poster: Tom Christiansen 
# Subject: Re: filehandles and defined
# Archived: Apr 29 02:16 1994
#
# :does not work if FH has never been opened.  This is another case where
# :filehandle != variable is confusing.
# I notice that you said perl4.  What you have there works in perl5.
# 
EndText= Text= ###################################################################### EndText= Name=Re: Read/Write dBase files Path=0/perlinfo/scripts/file-handling/hex Type=0 Text=
# File Name: hex
# File Size in BYTES: 3143
# Sender/Author/Poster: grover@wiggins.isri.unlv.edu (Kevin Grover)
# Subject: Re: Read/Write dBase files
# Archived: Apr 29 02:16 1994
#
#  $Id: hex,v 1.1 1993/04/21 17:27:16 grover Exp $
# > Has anyone worked out how to read/write dBase files from Perl? ISTR that 
# > A dbase header has a few longs and unsigneds. How do I read/write these from
# 
EndText= Text= ###################################################################### EndText= Name=Re: How do I use fcntl on HPUX 9.0? Path=0/perlinfo/scripts/file-handling/hp.flock.emul.pl Type=0 Text=
# File Name: hp.flock.emul.pl
# File Size in BYTES: 2854
# Sender/Author/Poster: bill@tardis.co.uk (William Hails)
# Subject: Re: How do I use fcntl on HPUX 9.0?
# Archived: Apr 29 02:16 1994
#
# > I am trying to understand how to use the unix fcntl commands F_GETLK,
# > F_SETLKW, and F_SETLK with the perl fcntl function.  In particular, 
# I've posted this before - and got lightly toasted for using an explicit
# argument to pack() - but my c2ph doesn't work :--( . Anyway it at least
# 
EndText= Text= ###################################################################### EndText= Name=Re: lockf and fcntl Path=0/perlinfo/scripts/file-handling/lockf.emulation Type=0 Text=
# File Name: lockf.emulation
# File Size in BYTES: 2676
# Sender/Author/Poster: mbeattie@black.ox.ac.uk (Malcolm Beattie)
# Subject: Re: lockf and fcntl
# Archived: Apr 29 02:16 1994
#
# In article  jwd@stone.ucs.indiana.edu (Jon Dunn) writes:
# >Has anyone written a function to emulate lockf in perl using fcntl?
# >I'm trying to write my own, but I'm not sure how to build and pass the
# >flock struct to perl's fcntl.  I would appreciate any code examples or
# 
EndText= Text= ###################################################################### EndText= Text= ###################################################################### EndText= Name=Expanding Symlinks Path=0/perlinfo/scripts/file-handling/expand.symlink.pl Type=0 Text=
# File Name: expand.symlink.pl
# File Size in BYTES: 2405
# Sender/Author/Poster: bet@sbi.com (Bennett Todd @ Salomon Brothers Inc., NY )
# Subject: Re: Name of file symlink points to?
# Archived: May 1 1993
#
# This inspired me; it seemed to be doing most of a job I have occasionally
# wanted, but never felt like implementing, namely making canonical pathnames
# with _all_ symlinks expanded. I mean to include here expanding symlinks that
# occur in the middle of pathnames pointed to by other symlinks. Of course I
# couldn't stop there, I had to try to deal with /./ and /../ and automounter
# 
EndText= Text= ###################################################################### EndText= Name=A faster grep example Path=0/perlinfo/scripts/file-handling/fastgrep.example Type=0 Text=
# File Name: fastgrep.example
# File Size in BYTES: 1977
# Sender/Author/Poster: mab@wdl39.wdl.loral.com (Mark A Biggar)
# Subject: Re: A Faster Grep???
# Archived: May 24 1993
#
# >Now I'd like to have lists which have the same path before something unique.
# >I'l like List A to have all the filess+path in /usr/bin and
# >list B to have all the files+path in /usr/lib.
# 
EndText= Text= ###################################################################### EndText= Name=cachein() a package routine to give indirect filehandles Path=0/perlinfo/scripts/file-handling/filecache.pl Type=0 Text=
# File Name: filecache.pl
# File Size in BYTES: 2439
# Sender/Author/Poster: tchrist
# Subject: Opening multiple filehandles
# Archived: Apr 6 1993
#
# Here's one thing that I use.  Just call
#     &'cachein($filename);
# and now you can say
#     while (<$filename>) {
# It also gives nice error message for warn and die this way.
# 
EndText= Text= ###################################################################### EndText= Name=flock.using.fcntl.example Path=0/perlinfo/scripts/file-handling/flock.using.fcntl.example Type=0 Text=
# File Name: flock.using.fcntl.example
# File Size in BYTES: 1956
# Sender/Author/Poster: bill@tardis.co.uk (William Hails)
# Subject: Re: For SVR4 implementations, could perl use lockf rather than flock?
# Archived: Oct 5 1993
#
# > Probably you can go through fcntl() to get at it.
# > --tom
# Here's an example:
# open(LOCKFILE, ">>/usr/sysop/etc/menulock") || die "cant open lockfile";
# 
EndText= Text= ###################################################################### EndText= Name=list full creation timestamp for older file Path=0/perlinfo/scripts/file-handling/full.ctime.on.file.pl Type=0 Text=
# File Name: full.ctime.on.file.pl
# File Size in BYTES: 1614
# Sender/Author/Poster: dcarriga@NoFC.Forestry.CA (Dave Carrigan)
# Subject: Re: How list full creation timestamp for file >6 months old?
# Archived: May 30 1993
#
# >This is REALLY basic, but "ls" doesn't do it, if I 
# >believe the SunOS 4.1.1 man pages.  How to I list the 
# >FULL creation timestamp on a file >6 months old?  (I also
# >poked around in the "perl" camel book and didn't find 
# >anything.)
# 
EndText= Text= ###################################################################### EndText= Name=Relink - moving links around Path=0/perlinfo/scripts/file-handling/relink Type=0 Text=
# File Name: relink
# File Size in BYTES: 3189
# Sender/Author/Poster: lwall@netlabs.com (Larry Wall)
# Subject: Re: moving files
# Archived: Jul 29 1993
#
# $Header: relink,v 1.2 90/08/12 00:21:14 lwall Locked $
# : 	I want to mv a symbolic link from one name to another.  (It probably
# : does not matter) This link points to a file on another device.  
# : rename() complain that the file being rename is a Cross-device link.
# : 	mv exactly what I want, but I perfer to know the perl-way of doing it.
# Here's the relink program.
# 
EndText= Text= ###################################################################### EndText= Name=relink files which have duplicated information Path=0/perlinfo/scripts/file-handling/relink.duplicates.pl Type=0 Text=
# File Name: relink.duplicates.pl
# File Size in BYTES: 5408
# Sender/Author/Poster: ian@unipalm.co.uk (Ian Phillipps)
# Subject: Re: checking for duplicate files
# Archived: May 10 1993
#
# This relinks files which have duplicated information.
# Well, here's a script I hacked up which goes a step farther. It doesn't
# mind what the files are called, and works resonably efficiently on large
# quantities of files. It will try to make links even when one of the
# 
EndText= Text= ###################################################################### EndText= Name=split a file into parts Path=0/perlinfo/scripts/file-handling/split.file.many.parts Type=0 Text=
# File Name: split.file.many.parts
# File Size in BYTES: 6549
# Sender/Author/Poster: mooring@grimoire.tymnet.com (Ed Mooring)
# Subject: Re: Is there a better way to do this?
# Archived: Jun 4 1993
#
# You could use csplit(1), I suppose.  Here's my contribution to the perl
# one-liners:
# 
EndText= Text= ###################################################################### EndText= Name=sysopen() function Path=0/perlinfo/scripts/file-handling/sysopen.pl Type=0 Text=
# File Name: sysopen.pl
# File Size in BYTES: 603
# Sender/Author/Poster: tchrist
# Subject: Tom's sysopen() function
# Archived: Apr 6 1993
#
# Tom's sysopen() function, using syscall()
# 
EndText= Text= ###################################################################### EndText= Name=convert upper case filenames to lowercase Path=0/perlinfo/scripts/file-handling/ucase.to.lcase.fnames Type=0 Text=
# File Name: ucase.to.lcase.fnames
# File Size in BYTES: 2730
# Sender/Author/Poster: woan@exeter.austin.ibm.com (Ronald S. Woan)
# Subject: Converting Uppercase file names to Lowercase
# Archived: Jun 2 1993
#
# quickly renames all mixed case files specified on the commandline into
# their lowercase (if invoked as locase) or uppercase (if invoked as
# upcase) equivalents. Renames all files in current directory when no
# commandline arguments given.
# 
EndText= Text=
Comments, suggestions, or criticisms on this archive to:
<wjm@metronet.com>, or to the original author.
#
EndText=