JupiterHost.Net wrote:
you likely need the multi line switch.
change this:
my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/i;
to:
my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/si;
The /s makes it match through multi lines.
No, no, your understanding of the /s modifier appears to be a
misconception.
It changes
Shu Hung wrote:
> I recently wrote a script with a '-f' file test inside.
>
> Normally, a '-f ' returns TRUE if a file with that
> filename exist. My script returns TRUE for all the files -- except
> the largest one (9.7 GB) on my list (others are XX MB - XXX MB in
> size). Whenever I test it with
Hi, can you please show me an example of the following signal catching
scenario:
1. First Ctrl-C => Just warn and wait for a key-stroke, if any key other
then Ctrl-C is presses, continue with the program.
2. If Ctrl-C was pressed again => Try to die gracefully, meaning do some
cleanup before dyi
[EMAIL PROTECTED] wrote:
I have this code:
my ($month, $day, $year) = (localtime)[4,3,5];
printf ("%02d/%02d/%02d\n", $month+1,$day,$year+1900);
which gives me
08/16/2004
what I want is 08/16/04.
"perldoc -f localtime" describes very clearly how you get a two digit
year. It's advisable to study th
On Tue, 2004-08-17 at 10:18, Gunnar Hjalmarsson wrote:
> Shu Hung wrote:
> > I recently wrote a script with a '-f' file test inside.
> >
> > Normally, a '-f ' returns TRUE if a file with that
> > filename exist. My script returns TRUE for all the files -- except
> > the largest one (9.7 GB) on my
Hi all,
I am trying to write a perl script that requires the content of the
clipboard. Is there a way I can do this?
I am using Redhat AS 3 linux with a KDE desktop and Klipper
Thanks
Ram
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> Hi, can you please show me an example of the following signal
> catching
> scenario:
> 1. First Ctrl-C => Just warn and wait for a key-stroke, if
> any key other
> then Ctrl-C is presses, continue with the program.
> 2. If Ctrl-C was pressed again => Try to die gracefully,
> meaning do some
> cle
Fontenot, Paul wrote:
> Yes I have. The following URL's are the exact data from the database.
Bottom post, please!
>
> I can get the MS??-??? from this URL
> href="http://www.microsoft.com/technet/security/bulletin/MS03-051.asp";
> target="_default">Microsoft Security Bulletin MS03-051
>
> But
On Tue, Aug 17, 2004 at 12:17:53PM +0800, Shu Hung (Koala) wrote:
> I recently wrote a script with a '-f' file test inside.
>
> Normally, a '-f ' returns TRUE if a file with that filename
> exist. My script returns TRUE for all the files -- except the largest
> one (9.7 GB) on my list (others are
Gunnar Hjalmarsson wrote:
JupiterHost.Net wrote:
you likely need the multi line switch.
change this:
my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/i;
to:
my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/si;
The /s makes it match through multi lines.
No, no, your understanding of the /s modifier appears to be a
Randal;
Thanks for answer I really needed to hear.
Ken
On Fri, 2004-08-13 at 18:36, Randal L. Schwartz wrote:
> > "Luke" == Luke Bakken <[EMAIL PROTECTED]> writes:
>
> Luke> The simple solution is to be sure that single quotes are around the
> Luke> strings passed to the "describe" comman
JupiterHost.Net wrote:
Gunnar Hjalmarsson wrote:
JupiterHost.Net wrote:
you likely need the multi line switch. change this:
my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/i;
to:
my ($mso) = $row[2] =~ /(MS\d\d-\d\d\d)/si;
The /s makes it match through multi lines.
No, no, your understanding of the /s modi
All,
If I wanted to subtract 1 from a date on the 1st of any month what module
will reflect the correct date? For example, system time is 09.01.04 and I
want data from 08.31.04, I would have to subtract 1 day. Which module do
I need to install?
thanks,
derek
After searching through the Perl Bookshelf CD, I have found that you can
declare a global and then use local() to change that value for a block
of code. I haven't found how to use a value from within a block of code
outside that block of code though. Is this possible? I'm sure I just
don't know wha
> After searching through the Perl Bookshelf CD, I have found that you can
> declare a global and then use local() to change that value for a block
> of code. I haven't found how to use a value from within a block of code
> outside that block of code though. Is this possible? I'm sure I just
> don'
Date::Manip from CPAN
-David
On Tue, 17 Aug 2004 12:50:16 -0400, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> All,
>
> If I wanted to subtract 1 from a date on the 1st of any month what module
> will reflect the correct date? For example, system time is 09.01.04 and I
> want data from 08.31.0
If you really want to use a BAD method, which you should NOT use:
while (...) {
$total = $row[0];
...
}
print $total . "\n";
What you SHOULD do is:
use strict;
...
my $total = "";
while (...) {
$total = $row[0];
...
}
print $total . "\n";
-David
On Tue, 17 Aug 2004 10:55:25
##
##
###
### FUNCTION NAME
### --
### DateMinusX()
###
### PURPOSE:
###
### Return a date that is X number of days ago
###
### RETURN VALUE:Comment:
###
I'm not sure if beginners is the most appropriate place for this
question; if not, please suggest another list.
My perl script forks and the child is subsequently replaced by another
(non-Perl) program with exec(). That child has its own subprocess.
In response to certain events, the parent
David Greenberg wrote:
[EMAIL PROTECTED] wrote:
If I wanted to subtract 1 from a date on the 1st of any month
what module will reflect the correct date? For example, system
time is 09.01.04 and I want data from 08.31.04, I would have to
subtract 1 day. Which module do I need to install?
Date::Man
Through out the perldoc, I always see something like this : B,
F. something like that,
would anybody tell me what this kind of thing is ? or any reference I can know more
about this kind of phrases are ?
TIA
Bee wrote:
> Through out the perldoc, I always see something like this : B,
> F. something like that, would anybody tell me what
> this kind of thing is ? or any reference I can know more about this
> kind of phrases are ?
perldoc perlpod
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc
Hi all, newbie question: I've got this .pl that has variables hard coded in it, and I
need to draw these form a file instead... Here's roughly what I've got, how can I get
the variables from a file in stead?
my %ldap_hosts =("SOME_ENVIRONMENT_NAME" => "server.somename.org",
"AN
[EMAIL PROTECTED] wrote:
> Hi all, newbie question: I've got this .pl that has variables hard
> coded in it, and I need to draw these form a file instead... Here's
> roughly what I've got, how can I get the variables from a file in
> stead?
>
> my %ldap_hosts =("SOME_ENVIRONMENT_NAME" => "serv
On Tue, 17 Aug 2004 [EMAIL PROTECTED] wrote:
So how do I read this in? I know I need to open the file, etc etc
etc.. I was thinking I need:
open(CONF, ">$CONFFileName") || die "ERROR: could not open $CONFFileName, $!\n";
Opening a file with the '>' means "overwrite the existing contents".
This p
so is the shift or 0 statement doing the opposite of push / pop calls do?
shift deletes elements of a list or an array?
$x = (2,3,4);
$y = shift ($x);# y is now 3,4
why is the or 0 needed b/c with just my $days = 0 the whole subroutine does not work
! !
??
Derek B. Smith
one more thing, shouldn't my $time = time;
be
local $time = time;
even though my is safer and faster, local can be used globally and called
from within any subroutine?
thank you,
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Gunnar Hjalmarsson <[EMAIL PROTECTED]>
08/17/2004 01:4
I've been using the DB_File $DB_BTREE module to create groups and sort
them on an 8 million record file. Is there a faster way to do this or
am I still getting pretty good perfomance with this module?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
: Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
:
: : Personally I don't know which of all the date related modules
: : that would fit best, but I'm sure others do. I for one wouldn't
: : use any module:
: :
: : my $time = time;
: :
: : sub m
> My perl script forks and the child is subsequently replaced by another
> (non-Perl) program with exec(). That child has its own subprocess.
>
> In response to certain events, the parent tries to kill the child (and
> its children).
>
> Currently, my method for doing this is:
>
> local $SIG{HU
From: "Shu Hung (Koala)" <[EMAIL PROTECTED]>
> I recently wrote a script with a '-f' file test inside.
>
> Normally, a '-f ' returns TRUE if a file with that filename
> exist. My script returns TRUE for all the files -- except the largest
> one (9.7 GB) on my list (others are XX MB - XXX MB in siz
On Tue, 17 Aug 2004, Rob Benton wrote:
I've been using the DB_File $DB_BTREE module to create groups and sort
them on an 8 million record file. Is there a faster way to do this or
am I still getting pretty good perfomance with this module?
What performance are you getting now?
Try benchmarking y
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
: Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
:
: : Personally I don't know which of all the date related
: : modules that would fit best, but I'm sure others do. I
: : for one wouldn't use any module:
: :
: : my $time = time;
: :
: : sub mydate
Fontenot, Paul <[EMAIL PROTECTED]> wrote:
: EXAMPLE:
:
: while (my(@row) = $sth1->fetchrow_array)
: {
: my ($total) = $row[0];
: print "Total Scanned:\t $total\n";
: }
:
: print "Total:\t $total\n";
:
: After searching through the Perl Bookshelf CD
On Tue, Aug 17, 2004 at 05:38:53PM -0400, Jim wrote:
> > My perl script forks and the child is subsequently replaced by another
> > (non-Perl) program with exec(). That child has its own subprocess.
> >
> > In response to certain events, the parent tries to kill the child (and
> > its children).
>
> Yes, I have the Perl Cookbook. I think I've read and tried all the
> relevant recipes from there, but I'm still unable to kill
> grandchildren
> when the child's output is redirected to /dev/null and the
> parent is run
> from a shell script.
>
> Here's the basic code simplified a bit for illus
Charles K. Clarkson wrote:
[EMAIL PROTECTED] wrote:
Gunnar Hjalmarsson wrote:
Personally I don't know which of all the date related modules
that would fit best, but I'm sure others do. I for one wouldn't
use any module:
my $time = time;
sub mydate {
my $days = (shift or 0);
O! Thanks alot, that just simply the formatting codes, simple !
Thank you.
- Original Message -
From: "Gunnar Hjalmarsson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 18, 2004 2:11 AM
Subject: Re: A --- What this kind of meaning is ?
> Bee wrote:
> > Through ou
38 matches
Mail list logo