Matt Simonsen wrote at Tue, 20 Aug 2002 00:09:10 +0200:
> I'm wondering what people would suggest as the best way to split this so
> it respects the "" and [] as fields yet doesn't kill performance?
>
>
> 1.2.3.4 - - [15/Aug/2002:06:43:39 -0700] "GET /usr/123 HTTP/1.0" 200
> 38586 "http://www.c
use Time::localtime;
$b = localtime->year() +1900 ;
print "What year were you born in?\n";
$a = ;
chop($a);
$age = ($b - $a) ;
print "You are $age years old!\n";
--
Date: August(VIII) 12th(XII),2002(MMII)
!!
!
On Aug 19, Steve said:
>#!/usr/bin/perl
You should turn on warnings and use strict.
#!/usr/bin/perl -w
use strict;
If you're using Perl 5.6+, you can remove the -w and replace it with
use warnings;
>print "What year were you born in?\n";
>$a = ;
>chop($a);
chomp(my $birth = );
>$b
Hello everyone,
I'm just trying to use the simplest of examples to learn how to use
different functions and just get an understanding of how things are
processed, and the syntax of Perl commands.
I just want to get the year as a variable. Here's the rediculously
simple script I've started but I
A Taylor [[EMAIL PROTECTED]] quoth:
*>
*>Also I have had to add 1 to the hour var: $hour ++; even though my web
*>space providers are in the same country as me - does anyone know why this
*>is - I am probably being a bit daft - well it is 1am, and I have been
*>perling for about 16 hours now !!
On Monday, August 19, 2002, at 03:08 , John Ross wrote:
> I am trying to pass an already existing hash into a subroutine, modify
> that hash, and have the modifications "take" when I leave the subroutine.
> I have looked through a number of perl books, but I either don't know what
> I am looking
On Monday, August 19, 2002, at 03:53 , Leon, Yanet I,,DMDCWEST wrote:
> Hello all,
[..]
If I get your question - it is
how do I implement the standard syslog log roller in perl
you will want to do
perldoc -f rename
you may want to check out
http://www.wetware.com/dr
A Taylor wrote:
>
> Hi all,
Hello,
> Thanks for your help so far - I have managed to sort out my time and date
> problem but there are a few points that I dont understand.
> The code I have used is as follows:
>
> # get the hours, mins, weekday, day, month and year
> $hour = (gmtime)[2];
> $
Kevin Meltzer wrote:
>
> On Mon, Aug 19, 2002 at 04:35:53PM -0700, John W. Krahn ([EMAIL PROTECTED]) said
>something similar to:
> > Kevin Meltzer wrote:
> > >
> > > This is actually a bug. It just seems that nobody seems to care :) It
> > > would break too many JAPHs which use this.
> > >
> > >
Yanet I wrote:
>
> Hello all,
Hello,
> I have been having a bit of trouble with a script that is very easy to
> develop in ksh. I am just trying to rotate logs.
>
> some of the variables I declare are:
> my $LOGDIR=/some/where/in/my/file/system/logdir;
> my $LOG=/some/where/in
Hi all,
Thanks for your help so far - I have managed to sort out my time and date
problem but there are a few points that I dont understand.
The code I have used is as follows:
# get the hours, mins, weekday, day, month and year
$hour = (gmtime)[2];
$min = (gmtime)[1];
$wday = (qw(Sun Mon T
John Ross wrote:
>
> I am trying to pass an already existing hash into a subroutine, modify
> that hash, and have the modifications "take" when I leave the subroutine.
> I have looked through a number of perl books, but I either don't know what
> I am looking for, or I just don't understand how t
Does that behavior not seem like a bug to you? My reference is
discussions on #perl about it. I'll dig up the logs if you wish (when I
can get to that).
Cheers,
Kevin
On Mon, Aug 19, 2002 at 04:35:53PM -0700, John W. Krahn ([EMAIL PROTECTED]) said
something similar to:
> Kevin Meltzer wrote:
>
Matt Simonsen wrote:
>
> I'm wondering what people would suggest as the best way to split this so
> it respects the "" and [] as fields yet doesn't kill performance?
>
> 1.2.3.4 - - [15/Aug/2002:06:43:39 -0700] "GET /usr/123 HTTP/1.0" 200
> 38586 "http://www.careercast.com/js.php"; "Mozilla/4.0
Wagner wrote:
>
> Hi,
Hello,
> Though this thread is now almost a week old, I thought I'd offer one more
> suggestion. How about using this
>
> %people = map { chomp; split } ;
>
> in place of
>
> %people = ;
>
> To my eyes, it is cleaner than adding an explicit loop.
The chom
Kevin Meltzer wrote:
>
> This is actually a bug. It just seems that nobody seems to care :) It
> would break too many JAPHs which use this.
>
> So, don't depend on it, in case it is ever fixed.
Can you cite a reference to this behavior described as a bug?
John
--
use Perl;
program
fulfillmen
Hello all,
I have been having a bit of trouble with a script that is very easy to
develop in ksh. I am just trying to rotate logs.
some of the variables I declare are:
my $LOGDIR=/some/where/in/my/file/system/logdir;
my $LOG=/some/where/in/my/file/system/logdir/logtorotate;
I h
A Taylor wrote:
>
> Hi all, I am trying to declare some variables and was wondering what the
> best way to do this was. Is it legal to do something like this:
> my (@pairs, $ENV, $buffer);
Yes.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hi,
Though this thread is now almost a week old, I thought I'd offer one more
suggestion. How about using this
%people = map { chomp; split } ;
in place of
%people = ;
To my eyes, it is cleaner than adding an explicit loop.
TMTOWTDI,
Jeff
-Original Message-
From: Jose
Hi Anadi,
You want to take a look at the MIME-tools, specifically MIME::Parser
and MIME::Head (look for MIME::Tools on http://search.cpan.org). If
that seems too heavy duty for your needs, take a look at the Mail::*
modules on the CPAN.
Also look there for ways to access the mail, if you haven'
A code snippet would be very helpful. To pass a hash and update it,
then
func(\%hash);
sub func {
my ( $hash ) = @_;
$hash->{key} = 1;
# this should be reflected back in the calling program when you return
}
Wags ;)
-Original Message-
From: John Ros
I am trying to pass an already existing hash into a subroutine, modify
that hash, and have the modifications "take" when I leave the subroutine.
I have looked through a number of perl books, but I either don't know what
I am looking for, or I just don't understand how this works. I am
assumin
I'm wondering what people would suggest as the best way to split this so
it respects the "" and [] as fields yet doesn't kill performance?
1.2.3.4 - - [15/Aug/2002:06:43:39 -0700] "GET /usr/123 HTTP/1.0" 200
38586 "http://www.careercast.com/js.php"; "Mozilla/4.0 (compatible; MSIE
5.5; Windows 98
On Monday, August 19, 2002, at 02:40 , Nikola Janceski wrote:
> host1 is one host. the only host that I have been testing this on.
> via command line it works.
> via rsh command line it doesn't.
> via rsh to command prompt, then command lining it, it works.
if you do an
rsh farhost
yo
On Monday, August 19, 2002, at 12:42 , Nikola Janceski wrote:
[..]
> but if run it via an rsh command (on the same host for now):
> /bin/rsh host1 /yyy/TreeInfo/tmp/gather_os_info.pl
>
> I get the following error:
> Can't locate object method "new" via package "XML::SAX::PurePerl" (perhaps
> you
host1 is one host. the only host that I have been testing this on.
via command line it works.
via rsh command line it doesn't.
via rsh to command prompt, then command lining it, it works.
It looks like it is differences in the env. vars.
essentially when I use rsh and run a command (ie rsh host1
I am trying to get the time and date that some one sends me an email.
can anyone help me or point me in the right direction as how to get these in
perl ???
Thanks in advance for your help - its much appreciated
Anadi
You are just a dewdrop, and as you meditate the dewdrop starts slipping from
Thanks all
your help has been much appreciated
Anadi ^_^
You are just a dewdrop, and as you meditate the dewdrop starts slipping from
the petals of the Lotus towards the ocean. When the meditation is complete,
the dewdrop has disappeared into the ocean. Or you can say, the ocean has
disappe
Maybe you can refer to use vars ( perldoc -m vars).
Rgds,
Connie
- Original Message -
From: "A Taylor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 20, 2002 4:23 AM
Subject: Is it legal ???
> Hi all, I am trying to declare some variables and was wondering what th
You can do that, but if you're planning on assigning the variables any value
other than (), then you will want to put the array LAST. Otherwise I don't
know if Perl will let the array suck up all of the values you try to assign.
This way you can be sure that your scalars receive a value.
-O
This is actually a bug. It just seems that nobody seems to care :) It
would break too many JAPHs which use this.
So, don't depend on it, in case it is ever fixed.
On Mon, Aug 19, 2002 at 01:17:15PM -0700, John W. Krahn ([EMAIL PROTECTED]) said
something similar to:
> Bob Showalter wrote:
> Als
In a message dated 8/19/2002 3:25:35 PM US Eastern Standard Time,
[EMAIL PROTECTED] writes:
> Hi all, I am trying to declare some variables and was wondering what the
> best way to do this was. Is it legal to do something like this:
> my (@pairs, $ENV, $buffer);
> The reason I ask is that I am
> -Original Message-
> From: John W. Krahn [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 4:17 PM
> To: [EMAIL PROTECTED]
> Subject: Re: newbie question
>
>
> Bob Showalter wrote:
> >
> > ...consider if $| were -1 prior to the increment).
>^
>
> It's
Hi all, I am trying to declare some variables and was wondering what the
best way to do this was. Is it legal to do something like this:
my (@pairs, $ENV, $buffer);
The reason I ask is that I am not sure if its cool to have Arrays and Scalar
vars within the same brackets.
Thanks for your help
A
Bob Showalter wrote:
>
> > From: Chad Kellerman [mailto:[EMAIL PROTECTED]]
> >
> >I have only been writing perl for a few months, so forgive
> > me if this
> > sounds stupid.
>
> No, it's an excellent question.
>
> > what is the difference between:
> >
> > $| = 1;
> > and
> > $|++;
>
> The
nope.. then it would be able to get that far.
Remember I have:
use XML::Simple;
Which calls other modules (XML::SAX etc.)
but stranger is that PurePerl.pm is in the same dir as the ParserFactory.pm.
plus the onlything I have in my PERL5LIB env var is my private module dirs.
I use 'use lib' all
One thing you might check is your PERL5LIB environment variable when you rsh
vs when you login. It could be that rsh does not run your .profile and
therefore does not set up your environment variables thereby prohibiting
perl from seeing the appropriate libraries.
- Original Message -
Fro
I have posted this to XML and no response there. so maybe it's simpler than
that...
I have script that uses XML::Simple, which works when run via command line:
/yyy/TreeInfo/tmp/gather_os_info.pl
but if run it via an rsh command (on the same host for now):
/bin/rsh host1 /yyy/TreeInfo/tmp/gather
Weekly posting statistics for perl.beginners - week 33 of 2002.
>From Monday 2002-08-12 to Sunday 2002-08-18 there were
367 articles posted (15989 lines) by 121 authors, giving an average
3.03 articles per author, and an average article length of 44 lpa.
The average number of articles per day w
> -Original Message-
> From: Mariusz [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 6:41 AM
> To: [EMAIL PROTECTED]
> Subject: Perl and Berkley DB - troubles
>
>
> Hello,
>
> 1. I have installed perl (perl-5.6.1.tar.gz)
> 2. I have installed Berkley DB (db-4.0.14.tar.gz)
> 3
Mariusz [[EMAIL PROTECTED]] quoth:
*>Hello,
*>
*>1. I have installed perl (perl-5.6.1.tar.gz)
*>2. I have installed Berkley DB (db-4.0.14.tar.gz)
*>3. now, when I try to run a Perl script, it says:
*>
*>
*>Checking for installation of Berkely DB or GNU DB capability...
*>No
> -Original Message-
> From: Chad Kellerman [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 11:18 AM
> To: [EMAIL PROTECTED]
> Subject: newbie question
>
>
> Hello,
>
>I have only been writing perl for a few months, so forgive
> me if this
> sounds stupid.
No, it's an
In a message dated 8/19/2002 10:13:16 AM US Eastern Standard Time,
[EMAIL PROTECTED] writes:
> http://localhost/cgi-bin/printenv.pl
>
oh this is a stupid problem i had aswell... an easy solution is to rename the
..pl as .cgi and then it worked fine for me.. I know.. sounds dumb but IE
see's
> -Original Message-
> From: Matt Wetherill [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 11:11 AM
> To: Perl beginners
> Subject: CGI script problem
>
>
> Hi list,
>
> I'm just trying to get started with cgi (w2k, Apache 2.0.40),
> and have been
> using the sample script
This message is being redirected to the beginners-cgi list. Please
answer on that list, and to the original poster. Thanks.
Cheers,
Kevin
On Mon, Aug 19, 2002 at 04:11:14PM +0100, Matt Wetherill ([EMAIL PROTECTED])
said something similar to:
> Hi list,
>
> I'm just trying to get started with c
Mon Aug 19 09:39:37 EDT 2002
On Mon, Aug 19, 2002 at 03:01:13AM -0700, John W. Krahn wrote:
> Andrew Bogecho wrote:
> >
> > Hello fellow Perl users,
>
> Hello,
>
> > I would like to know how I can setup an external config file whose
> > variables I can then use in a perl script.
> >
[snip]
Hello all,
I have a list of files, and need to insert a word somewhere in the middle-
the files begin with a list of sequence names followed by alignments for
each sequence, and i'd like to insert the header "ALIGNMENTS" before they
begin..
Any starting ideas / pointers for me?
many thanks
and ha
Hello,
I have only been writing perl for a few months, so forgive me if this
sounds stupid.
what is the difference between:
$| = 1;
and
$|++;
Or can you point me in the right direction on where I can read
boutit?
Thanks,
Chad
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
Hi list,
I'm just trying to get started with cgi (w2k, Apache 2.0.40), and have been
using the sample script "printenv.pl" which is included with Apache:
#!c:/Perl/bin/Perl.exe
##
## printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain\n\n";
foreach
On Thu, 15 Aug 2002, Priss wrote:
> I have amended the first few lines, this works but I
> wonder if this bad...
>
> Priss
>
> while (<>)
> {
> /(\S+)/
> and $seen_in_file1{$1} += 1;
If the line that is being read is of the form
word1 word2
$1 will only contain 'word1'.
on Mon, 19 Aug 2002 10:09:16 GMT, [EMAIL PROTECTED] (Jochen Berger)
wrote:
> I've got a problem with a Perl Script I wrote to find files
> matching a special pattern. It worked fine until I commented it.
> From that time on the program has got problems with that WIN32
> feature called "You want
On Wed, 14 Aug 2002, Bob Showalter wrote:
> > > >>
> > > >>use POSIX ":sys_wait_h";
> > > >>#...
> > > >>do {
> > > >>$kid = waitpid(-1,&WNOHANG);
> > > >>} until $kid == -1;
> > > >
> > > >
Hi, y'all!
I've got a problem with a Perl Script I wrote to find files matching a special
pattern. It worked fine until I commented it. From that time on the program has got
problems with that WIN32 feature called "You want spaces in your file name? Then do
it!". If the program finds a directo
Hello,
1. I have installed perl (perl-5.6.1.tar.gz)
2. I have installed Berkley DB (db-4.0.14.tar.gz)
3. now, when I try to run a Perl script, it says:
Checking for installation of Berkely DB or GNU DB capability...
No DBM package was successfully found or installed at
/
on Mon, 19 Aug 2002 00:47:49 GMT, [EMAIL PROTECTED] (Andrew
Bogecho) wrote:
> I would like to know how I can setup an external config file whose
> variables I can then use in a perl script.
[...]
> I know that this can be done by setting up Config as Config.pm and
> get the variables with a "u
Andrew Bogecho wrote:
>
> Hello fellow Perl users,
Hello,
> I would like to know how I can setup an external config file whose
> variables I can then use in a perl script.
>
> For example:
>
> File Config:
> **
> MAXLENGTH=56
Sun Aug 18 20:24:03 EDT 2002
Hello fellow Perl users,
I would like to know how I can setup an external config file whose
variables I can then use in a perl script.
For example:
File Config:
**
MAXLENGTH=56
USER_LIST="user1,use
57 matches
Mail list logo