[10005] in Perl-Users-Digest
Perl-Users Digest, Issue: 3598 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 31 15:05:01 1998
Date: Mon, 31 Aug 98 12:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 31 Aug 1998 Volume: 8 Number: 3598
Today's topics:
Re: Algorithm help...math and perl... (Larry Rosler)
Re: Algorithm help...math and perl... <ptomsic@pitt.edu>
Re: Algorithm help...math and perl... <jdporter@min.net>
Re: Algorithm help...math and perl... <jdporter@min.net>
Re: Algorithm help...math and perl... (Larry Rosler)
Re: Better Regular Expressions (was: Re: Imagine... a n <zenin@bawdycaste.org>
Re: Better Regular Expressions (was: Re: Imagine... a n <jdporter@min.net>
Re: comp.lang.perl.windows.misc <sboss@technologist.com>
Re: Compiling XS output fails on SGI with IDO 7.1 <scotth@sgi.com>
Re: DeCrypt ? <eashton@bbnplanet.com>
Re: even or odd birgitt@my-dejanews.com
Re: even or odd <birgitt@hamburg.citde.net>
Re: Forking and Use. <zenin@bawdycaste.org>
Re: how does one delete a file with Perl? <rootbeer@teleport.com>
Re: How to extract first letter in string? <rootbeer@teleport.com>
Re: Imagine... a non-greedy world! <jdporter@min.net>
Re: Imagine... a non-greedy world! <zenin@bawdycaste.org>
Re: Perl Cookbook, does anyone have it? <sboss@technologist.com>
Re: removing ^M when writing to file (Kelly Hirano)
Re: SSI problem <desquite@hotmail.com>
unlinking file if <= 1 hour dow.jones@home.se
unlinking file if <= 1 hour dwiesel@my-dejanews.com
Re: Y2K Date Support (Craig Berry)
Re: Yet another RegX Question. (Patrick Timmins)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 31 Aug 1998 10:00:26 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Algorithm help...math and perl...
Message-Id: <MPG.105476888431b71498977c@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <6sejpk$7a4$1@usenet01.srv.cis.pitt.edu> on Mon, 31 Aug 1998
12:41:19 -0400, Tomsic, Paul <ptomsic@pitt.edu> says...
> I'm trying to make a program that will take a directory of files (on NT)
> and assemble them in order, so I'm thinking about appending a letter on to
> the end of each file, such that
> file1_a, file2_b, file3_c,...,file27_aa, file28_bb, etc.
>
> That way the directory would be in order. NT orders such that the files
> would be
> 1,10,100,2,20,200,3,30,300 which is no good.
>
> Has anyone done anything like this?
> I'm looking at something like the following scenerio....
Use something like this:
sprintf 'file%.3d', ++$n;
to get a suffix that has leading zeros. `perldoc -f sprintf`.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 31 Aug 1998 13:25:45 -0400
From: "Tomsic, Paul" <ptomsic@pitt.edu>
Subject: Re: Algorithm help...math and perl...
Message-Id: <6semcu$7jh$1@usenet01.srv.cis.pitt.edu>
thanks for the prompt reply, but don't think I can do that.
I've got the following..
____________________________________
opendir(DIR,"c:\\Temp\\Perl\\thistest\\");
@files = readdir(DIR);
foreach $file (@files) {
$newfile = $file . $letter;
@data = ();
open(FILE,"c:\\Temp\\Perl\\thistest\\$file");
while(<FILE>) {
push(@data,$_);
}
open(NEWFILE,">c:\\Temp\\Perl\\thistest\\$newfile");
print NEWFILE @data;
unlink("c:\\Temp\\Perl\\thistest\\$file");
}
____________________________________
but I can't seem to get the assignment to the $letter variable correct.
any thoughts?
Paul
tomsicpj@msx.upmc.edu
Larry Rosler wrote in message ...
>[Posted to comp.lang.perl.misc and a copy mailed.]
>
>In article <6sejpk$7a4$1@usenet01.srv.cis.pitt.edu> on Mon, 31 Aug 1998
>12:41:19 -0400, Tomsic, Paul <ptomsic@pitt.edu> says...
>> I'm trying to make a program that will take a directory of files (on NT)
>> and assemble them in order, so I'm thinking about appending a letter on
to
>> the end of each file, such that
>> file1_a, file2_b, file3_c,...,file27_aa, file28_bb, etc.
>>
>> That way the directory would be in order. NT orders such that the files
>> would be
>> 1,10,100,2,20,200,3,30,300 which is no good.
>>
>> Has anyone done anything like this?
>> I'm looking at something like the following scenerio....
>
>Use something like this:
>
>sprintf 'file%.3d', ++$n;
>
>to get a suffix that has leading zeros. `perldoc -f sprintf`.
>
>--
>(Just Another Larry) Rosler
>Hewlett-Packard Laboratories
>http://www.hpl.hp.com/personal/Larry_Rosler/
>lr@hpl.hp.com
------------------------------
Date: Sun, 30 Aug 1998 14:09:14 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Algorithm help...math and perl...
Message-Id: <35E9954A.5F78@min.net>
Tomsic, Paul wrote:
>
> Larry Rosler wrote in message ...
> >
> >sprintf 'file%.3d', ++$n;
> >
> >to get a suffix that has leading zeros. `perldoc -f sprintf`.
>
> thanks for the prompt reply, but don't think I can do that.
Why? Why don't you think you can do that?
If you want letters instead of numbers, start with $n = 'A'.
The autoincrement works with strings, you know.
> opendir(DIR,"c:\\Temp\\Perl\\thistest\\");
> open(FILE,"c:\\Temp\\Perl\\thistest\\$file");
> open(NEWFILE,">c:\\Temp\\Perl\\thistest\\$newfile");
You're asking for trouble if you don't test the result of open().
The canonical form is
$file = "foo";
open(F,$file) or die "open $file: $!";
Also, you know that in Perl, you can use forward slashes in
filenames, even on Dos/Win systems. Might look nicer:
opendir(DIR,"c:/Temp/Perl/thistest/");
> opendir(DIR,"c:\\Temp\\Perl\\thistest\\");
> @files = readdir(DIR);
I think you want to grep away the '.' and '..' entries.
@files = grep { ! /^\.{1,2}$/ } readdir(DIR);
Even better (in this case), grep for only regular files:
@files = grep { -f $_ } readdir(D);
> foreach $file (@files) {
> $newfile = $file . $letter;
> @data = ();
>
> open(FILE,"c:\\Temp\\Perl\\thistest\\$file");
>
> while(<FILE>) {
> push(@data,$_);
> }
> open(NEWFILE,">c:\\Temp\\Perl\\thistest\\$newfile");
> print NEWFILE @data;
>
> unlink("c:\\Temp\\Perl\\thistest\\$file");
> }
That's unnecessary trouble -- in addition to storing the
entire contents of each file in memory before writing it
out. Try this:
foreach ( @files ) {
my $file = 'c:/Temp/Perl/thistest/' . $_;
my $newfile = $file . $letter;
open FILE, "< $file" or die "open $file: $!";
open NEWFILE, "> $newfile" or die "open $newfile: $!";
print NEWFILE $_ while <FILE>;
close NEWFILE;
close FILE;
unlink $file;
}
--
John Porter
------------------------------
Date: Sun, 30 Aug 1998 14:09:05 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Algorithm help...math and perl...
Message-Id: <35E99541.3D1C@min.net>
Tomsic, Paul wrote:
>
> I'm trying to make a program that will take a directory of files (on NT)
> and assemble them in order, so I'm thinking about appending a letter on to
> the end of each file, such that
> file1_a, file2_b, file3_c,...,file27_aa, file28_bb, etc.
>
> That way the directory would be in order. NT orders such that the files
> would be
> 1,10,100,2,20,200,3,30,300 which is no good.
Sounds to me like the logical thing to do would be to
rename file1 to file001, file27 to file027, and so on, so that
the numeric part is always the same size -- say, 3 digits --
with zero padding.
so:
for ( <*> ) {
my $f = $_;
if ( s/^in(\d+)/'in' . sprintf("%03d",$1) . $'/e ) {
system("move $f $_");
}
}
--
John Porter
------------------------------
Date: Mon, 31 Aug 1998 11:37:06 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Algorithm help...math and perl...
Message-Id: <MPG.10548d2b3922d26898977d@nntp.hpl.hp.com>
In article <35E9954A.5F78@min.net> on Sun, 30 Aug 1998 14:09:14 -0400,
John Porter <jdporter@min.net> says...
> Tomsic, Paul wrote:
> >
> > Larry Rosler wrote in message ...
> > >
> > >sprintf 'file%.3d', ++$n;
> > >
> > >to get a suffix that has leading zeros. `perldoc -f sprintf`.
> >
> > thanks for the prompt reply, but don't think I can do that.
>
> Why? Why don't you think you can do that?
> If you want letters instead of numbers, start with $n = 'A'.
> The autoincrement works with strings, you know.
If you think you want more than 26 files, you could start with 'AA'. And
the sprintf with decimal-integer conversion becomes inappropriate.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 31 Aug 1998 16:54:35 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Better Regular Expressions (was: Re: Imagine... a non-greedy world!)
Message-Id: <904582142.449499@thrush.omix.com>
Uri Guttman <uri@sysarch.com> wrote:
: i wish this were IRC so we could just kick him from the group totally.
>snip<
This is why news readers have kill files. If yours doesn't, it's
broken.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Sun, 30 Aug 1998 13:18:22 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Better Regular Expressions (was: Re: Imagine... a non-greedy world!)
Message-Id: <35E9895E.482A@min.net>
Mee wrote:
>
> I do not think that a "new and improved" RE should
> start with commonly needed patterns as a foundation.
> What is commonly needed today may not be commonly
> needed tomorrow.
>
> Take HTML for example. One could make a RE engine that
> allows quick parsing of HTML (instead of the painstaking
> tag/subtag, etc. decomposition and reassembly), but it
> may not be worth the effort if the world (as expected)
> moves to something better than HTML.
In fact, it appears that the "something better" is going
to be XML. And parsing XML is essentially equivalent to
parsing HTML. So it does indeed appear that what will be
needed tomorrow is the same as what is needed today.
This is already under discussion in other threads and
newsgroups.
> So, it may be better to start with common sense instead.
Yes, it is always better to start with common sense.
Your implication that regex did not start with common
sense is misplaced and inflammatory, and makes you out
to be a fool.
--
John Porter
------------------------------
Date: Mon, 31 Aug 1998 13:16:08 -0400
From: Scott Boss <sboss@technologist.com>
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <35EADA58.6143@technologist.com>
I missed the original post but I think that comp.lang.perl.misc needs to
be broken up into several ccomp.lang.perl.xxx series groups. I think
that a comp.lang.perl windows (or win32) newgroup would be good. I
primarly program perl for UNIX systems but I am starting to use perl
under win95 for various tasks also. I would love to ask questions about
how to do things in perl but this newsgroup (comp.lang.perl.misc) is
just oo big. Unless you read it at least twice a day, every day, you
can miss posts very easily. I normally do not have time to read
comp.lang.misc.perl daily let alone multiple times a day.
Scott Boss
Atlanta Perl Mongers Fearless Leader
------------------------------
Date: 31 Aug 1998 10:39:05 -0700
From: Scott Henry <scotth@sgi.com>
Subject: Re: Compiling XS output fails on SGI with IDO 7.1
Message-Id: <yd8lno5aw5i.fsf@hoshi.engr.sgi.com>
>>>>> "D" == Daniel G Kluge <daniel@vis.inf.ethz.ch> writes:
D> I'm shure I'm doing something wrong, but whenever I try to compile some XS
D> generated code on my SGI O2, I get the following error Message:
D> "Base64.c": Error: Invalid format revision (WHIRL::0.28:) for WHIRL file
D> (/tmp/ctmB.BAAa001Nc)
D> This is for most XS generated Code, when using the -n32 compiler (IDO 7.1
D> with Patches), the compilation works, if I use -32, but then I
D> cannot link it to perl, which is an n32 binary.
It sounds like you may have an inconsistent compiler installation.
Alternatively, you may be mixing up the versions of perl on your
system. IRIX 6.3 comes with perl 4.036 isntalled, so you must have
compiled perl5.004_04 yourself. Make sure that when you configure
the extension that you don't rely on $PATH to get the right version
of perl -- specify it explicitely (assuming defaults):
/usr/local/bin/perl5.004_04 Makefile.PL
Or pick up the precompiled version of perl at
http://reality.sgi.com/scotth/info/perl5.html
(though it is compile -32 for backwards compatibility).
--
Scott Henry <scotth@sgi.com> / Help! My disclaimer is missing!
IRIX MTS, / GIGO *really* means: Garbage in, Gospel Out
Silicon Graphics, Inc / http://reality.sgi.com/scotth/
------------------------------
Date: Mon, 31 Aug 1998 17:34:30 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: DeCrypt ?
Message-Id: <35EADC52.5CC7176D@bbnplanet.com>
> Is there a way to decrypt a password? The perl docs did not mention
> anything about decryption, just encryption (using the crypt function).
yes. a program called crack. not recommended if not root on your own
system. crypt is a very cool function. if youre interested in crypto
there are a lot of nifty sites out there as well as books...start with
http://www.cypher.net
think of it this way. what good would a password be if anyone could
decrypt it?
food for thought.
e.
------------------------------
Date: Mon, 31 Aug 1998 17:56:18 GMT
From: birgitt@my-dejanews.com
Subject: Re: even or odd
Message-Id: <6seo42$r42$1@nnrp1.dejanews.com>
In article <6sbo6n$be$1@news.smart.net>,
hymie@lactose.smart.net (hymie!) wrote:
> As much as I hate to have to disagree with Abigail...
>
> In our last episode, the evil Dr. Lacto had captured our hero,
> abigail@fnx.com, who said:
>
> >Tom Christiansen (tchrist@mox.perl.com) wrote on MDCCCXXIII September
> >MCMXCIII in <URL: news:6s7es8$mcl$1@csnews.cs.colorado.edu>:
> >++
> >++ The question ``Is a number even'' means ``Is a
> >++ number an even multiple of 2''. In fact, once you do that, you can
> >
> >ITYM: "an even multiple of 1".
>
> Every (integer) is an even multiple of 1, because 1 divides evenly into
> them all with no remainder.
>
> 9 is an even multiple of 3, because 3 divides into it evenly.
>
> On the other hand, 6.25 is a multiple of 2, because 2 * 3.125 = 6.25;
> however, 6.25 is not an even multiple of 2.
A non native English speaker would get confused here. I thought an even
number is a number you can divide by 2 without a having a remainder.
In your two examples, you use the word even with a different meaning. In
other languages you would have two different words for what you are
describing.
1.) 2 * 1 = 2 2.) 2 * 1 = 2
4 * 1 = 4 2 * 2 = 4
6 * 1 = 6 2 * 3 = 6
8 * 1 = 8 2 * 4 = 8
all even multiples of 1, sums are all even numbers ( for 1.))
or
all multiples of 2, sums are all even numbers (for 2.))
I don't think that something dividing 'evenly' without a remainder,
has anything to do with even numbers.
Is my English comprehension wrong here ?
Birgitt Funk
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 31 Aug 1998 14:13:58 +0000
From: Birgitt Funk <birgitt@hamburg.citde.net>
Subject: Re: even or odd
Message-Id: <6sephq$pih$1@trader.ipf.de>
birgitt@my-dejanews.com wrote:
>
> In article <6sbo6n$be$1@news.smart.net>,
> hymie@lactose.smart.net (hymie!) wrote:
>
> 1.) 2 * 1 = 2 2.) 2 * 1 = 2
> 4 * 1 = 4 2 * 2 = 4
> 6 * 1 = 6 2 * 3 = 6
> 8 * 1 = 8 2 * 4 = 8
>
> all even multiples of 1, sums are all even numbers ( for 1.))
> or
> all multiples of 2, sums are all even numbers (for 2.))
Oops, make that _products_ are all even numbers, not _sums_, sorry.
Birgitt Funk
------------------------------
Date: 31 Aug 1998 16:52:48 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Forking and Use.
Message-Id: <904582035.893594@thrush.omix.com>
Jonathan Stowe <Gellyfish@btinternet.com> wrote:
: However in the perlfunc manpage the subroutine is different inasmuch as:
: $result = eval `cat $realfilename`;
: is altered to:
: $result = do $realfilename;
:
: Which both achieve the same thing.
No, they don't.
: Whilst I am not party to the
: reasons for this difference I would suggest that it was probably
: changed in order to allay such confusion as you are subject to.
Tom C. posted this not to long ago, which states all this
as clearly as it probably can be:
> Succinctly:
>
> 1) do $file is like eval `cat $file`, except the former:
> 1.1: searches @INC.
> 1.2: bequeaths an *unrelated* lexical scope on the eval'ed code.
>
> 2) require $file is like do $file, except the former:
> 2.1: checks for redundant loading, slipping already loaded files.
> 2.2: raises an exception on failure to find, compile, or execute $file.
>
> 3) require Module is like require "Module.pm", except the former:
> 3.1: translates each "::" into your system's directory separator.
> 3.2: primes the parser to disambiguate class Module as an indirect object.
>
> 4) use Module is like require Module, except the former:
> 4.1: loads the module at compile time, not run-time.
> 4.2: imports symbols and semantics from that package to the current one.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Mon, 31 Aug 1998 16:59:20 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: how does one delete a file with Perl?
Message-Id: <Pine.GSO.4.02A.9808310955510.26370-100000@user2.teleport.com>
On Mon, 31 Aug 1998, Jonathan A. Laub wrote:
> is there a "delete" file command in Perl?
Yes, and it's documented in the perlfunc manpage. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 31 Aug 1998 16:54:55 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to extract first letter in string?
Message-Id: <Pine.GSO.4.02A.9808310954250.26370-100000@user2.teleport.com>
On Mon, 31 Aug 1998 tech_support9@geocities.com wrote:
> what if I wanted to search out a keyword, within a string, or text
> file, and change that keyword to something else, like make it BOLD
> faced before displaying it to the page?
>
> How would you write this? Use split?
I'd probably use s///. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sun, 30 Aug 1998 13:01:25 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Imagine... a non-greedy world!
Message-Id: <35E98565.57DE@min.net>
Ronald J Kimball wrote:
>
> Mee <mee@mine.com> wrote:
>
> > Regardless, the point is not in how many books someone has read.
>
> When someone is arguing from a position of ignorance, as you are doing,
> how many books someone has read on the relevant topic is very much to
> the point.
Except that by failing to learn anything from said books,
their number is in fact irrelevant.
--
John Porter
------------------------------
Date: 31 Aug 1998 16:27:55 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Imagine... a non-greedy world!
Message-Id: <904580542.451921@thrush.omix.com>
Mee <mee@mine.com> wrote:
: I frequently have to write huge and uninteligible
: expressions, similar to my example string, to make
: Perl do what even a flatworm would understand as a
: logical thing.
You're quite free to convert your strings to byte
arrays and do the entire pattern tree by hand in pure
logic code if you'd like. By the time you finish most
of the rest of us will be doing contract work on Mars.
: I can only imagine a shock and disbelief that some
: poor slob is sure to experience when s/he opens these
: programs to make changes and sees those Godzilla
: expressions.
That's what the /x modifier is for...do you *ever* read
documentation?!
m{
(?:foo.*?bar) # comment for this part
foo(?!bar) # comment for this other part
};
: You think you made a serious typo in your first post?
: I am sure that that's only natural to Perl
: because Perl itself is just one big typo.
Then go program in Java or (blagh) Python while the rest of us
get some real work done.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Mon, 31 Aug 1998 13:21:31 -0400
From: Scott Boss <sboss@technologist.com>
Subject: Re: Perl Cookbook, does anyone have it?
Message-Id: <35EADB9B.DFA@technologist.com>
Amazon overnighted my cookbook to me and I had it sat. morning. I have
been reading it (bits and pieces) and it is a darn good book. Well
worth it's weight in gold. I suggest it for anyone that write perl
programs.
Scott Boss
Atlanta Perl Mongers Fearless Leader
------------------------------
Date: 31 Aug 1998 11:42:35 -0700
From: hirano@Xenon.Stanford.EDU (Kelly Hirano)
Subject: Re: removing ^M when writing to file
Message-Id: <6seqqr$qkc@Xenon.Stanford.EDU>
In article <Pine.GSO.4.02A.9808281827090.14973-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@teleport.com> wrote:
>On 28 Aug 1998, Antti-Jussi Korjonen wrote:
>
>> My problem are the ^M's. How can I get rid of them?
>
>Try one of the functions in perlfunc or the operators in perlop. I'd
>probably choose tr/// or chop or chomp, depending upon the situation. Hope
>this helps!
the ^M, btw, is \015 .
--
Kelly William Hirano Stanford Athletics:
hirano@cs.stanford.edu http://www.gostanford.com/
hirano@alumni.stanford.org (WE) BEAT CAL (AGAIN)! 100th BIG GAME: 21-20
------------------------------
Date: Mon, 31 Aug 1998 14:18:12 -0400
From: "DesQuite" <desquite@hotmail.com>
Subject: Re: SSI problem
Message-Id: <5KCG1.70$YI.8208652@news.asheboro.com>
The SSI includes are already set up on the server. Or so they say. I've
called tech support and talked their ears off about getting this to work and
they insist that it is something I'm doing. Any ideas? Thanks.
------------------------------
Date: Mon, 31 Aug 1998 16:50:10 GMT
From: dow.jones@home.se
Subject: unlinking file if <= 1 hour
Message-Id: <6sek82$mcn$1@nnrp1.dejanews.com>
Hi,
How do I unlink all files that is more than 1 hour old (creation or updated
does not matter) from a directory?
// Daniel
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 31 Aug 1998 16:50:18 GMT
From: dwiesel@my-dejanews.com
Subject: unlinking file if <= 1 hour
Message-Id: <6sek89$mcr$1@nnrp1.dejanews.com>
Hi,
How do I unlink all files that is more than 1 hour old (creation or updated
does not matter) from a directory?
// Daniel
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 31 Aug 1998 16:59:15 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Y2K Date Support
Message-Id: <6sekp3$f8j$1@marina.cinenet.net>
I R A Aggie (fl_aggie@thepentagon.com) wrote:
: Then you know about coordinate translatations? If so, you should have
: no problem with unix representing the current date as: 8 month, 30th
: day (depending on your time zone), the 98th year,
'7 month', actually. Recall that localtime uses January = 0.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Mon, 31 Aug 1998 17:16:40 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: Yet another RegX Question.
Message-Id: <6selpo$o53$1@nnrp1.dejanews.com>
In article <35EAACB9.75F547D6@sneex.fccj.org>,
bill@fccj.org wrote:
> chad@gurucom.net wrote:
> >
> > Ok, This works great. But if 'news' or 'http' is after the href=" I want
> > to skip it, how do I do that?
> >
> > (@cats) = $content =~ /<li><a href="(.*?)"><b>/ig;
> >
> > ???????
> >
> > (@cats) = $content =~ /<li><a href="^(http|news)(.*?)"><b>/ig;
> >
> > thanks,
> >
> > -chad
> >
> > -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> > http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
> next if $url =~ /^(a href=http:|a href=news:)/;
Typos / mistakes :
next if $url =~ /^(a href=http:|a href=news:)/;
^ ^" ^"
remove insert insert
to give:
next if $url =~ /(a href="http:|a href="news:)/;
Patrick Timmins
U. Nebraska Medical Center
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 3598
**************************************