Stuart Clark wrote:
>
> Hi All
> Is there an easier way of picking out the number 16764 in this line
> rather that using an array, split then $number[3]
>
> I just want to get 16764 into $recievedmail
>
> Is the answer something like this
>
> $recievedmail = ($data)[3];
>
> $data = "Received
Bill Akins wrote:
>
> Hello all,
Hello,
> I have a var, $DOC_NAME, holding a file name. I need to get the first
> part of the variable into another variable. Some examples are
> A98-12345, SO-02-789, P-99-029833 and GQE-37-2199.
>
> Examples:
> A98-12345, I need A98
> SO-02-789, I need SO-02
Andy Schwarz wrote:
>
> Howdy!
Hello,
> I am attempting to import some mailing list archives into lyris format using
> a Perl script. I have all of the script working, except for the importing of
> the dates. For some reason, the date field does not import correctly.
>
> Below is the data tha
Hi All
Is there an easier way of picking out the number 16764 in this line
rather that using an array, split then $number[3]
I just want to get 16764 into $recievedmail
Is the answer something like this
$recievedmail = ($data)[3];
$data = "Received 921MB 16764 3955 375 2.2% 1296 7.7%";
On Friday, May 17, 2002, at 05:35 PM, drieux wrote:
>
> On Friday, May 17, 2002, at 05:16 , Mark Anderson wrote:
>
> we all agree that this is a 'bad' idea and that
> timothy has the right solution...
> now for the troubling bits...
>
>
>>> What's the best way to do this? I've tried
>>>
>>>
Hello all,
I have a var, $DOC_NAME, holding a file name. I need to get the first
part of the variable into another variable. Some examples are
A98-12345, SO-02-789, P-99-029833 and GQE-37-2199.
Examples:
A98-12345, I need A98
SO-02-789, I need SO-02
P-99-029833 I need P-99
GQE-37-2199 I need G
On Friday, May 17, 2002, at 01:41 , [EMAIL PROTECTED] wrote:
> # Build the value string 'eric','34','555-1212'
> foreach ($age $name $phone) {
> $values .= $dbh->quote($_) . ',';
> }
> # Remove the extra comma at the end
> chop $values;
>
> $dbh->do(INSERT INTO $dbfile ($column
On Friday, May 17, 2002, at 05:34 , Andy Schwarz wrote:
[..]
> The e-mail headers look like:
>
> Date: Mon, 31 Jan 2000 19:09:12 -0600
> Reply-To: Bob Jones <[EMAIL PROTECTED]>
> Sender: ISWORLD Information Systems World
> Network<[EMAIL PROTECTED]>
> From: Bob Jones <[E
On Fri, 17 May 2002, Mark Anderson wrote:
> It works for me (using perl 5.6.1), what seems to be the problem?
> Why do you want to do this instead of just having three print statements?
> Are you sure that you have data in the thre variables?
FWIW: Looking back at my original script, I had decl
On Friday, May 17, 2002, at 05:16 , Mark Anderson wrote:
we all agree that this is a 'bad' idea and that
timothy has the right solution...
now for the troubling bits...
>> What's the best way to do this? I've tried
>>
>> foreach (qw(name age phone)) {
>> print ${$_};
>>
Howdy!
I am attempting to import some mailing list archives into lyris format using
a Perl script. I have all of the script working, except for the importing of
the dates. For some reason, the date field does not import correctly.
Below is the data that I am trying to import and the script used
On Friday, May 17, 2002, at 03:18 , loan tran wrote:
> My question are:
>
> 1. Is there a way to make search_error.pl continue to
> read the errorlog_file after it was pruned without
> restarting the script.
>
> 2. In the situation I have to restart the script (like
> in case of machine have been
>I'm trying to loop through a list of variables and print their values.
>e.g., print $name, $age, $phone.
>
>What's the best way to do this? I've tried
>
> foreach (qw(name age phone)) {
> print ${$_};
> }
>
>but that doesn't seem to work.
It works for me (using pe
close, but leave out the qw.
foreach($name,$age,$phone){
print "$_ ";
}
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 1:12 AM
To: Beginners Perl Mailing List
Subject: Looping through variables
Hello, All:
I'm trying to loop t
Hello, All:
I'm trying to loop through a list of variables and print their values.
e.g., print $name, $age, $phone.
What's the best way to do this? I've tried
foreach (qw(name age phone)) {
print ${$_};
}
but that doesn't seem to work.
--
Eric P.
Los Gato
Hello Perl Gurus,
I need your help!
Here is the situation:
The following script searchs for a certain error in an
increasemental errorlog_file, and print out the
result.
Note that when the size of errolog_file grow into 5M
there is a process that prunes the errorlog_file,
makes its size become
Test Message. please disregard.
On Friday, May 17, 2002, at 01:06 , Scot Needy wrote:
We both agree that IF the code got into main memory -
then the 'compile' is finished - and it will just cruise along.
{ some folks have seen the 'problem' that they wrote a CGI that
forks, and found something wrong with it - removed the 'tex
Hi!
I have a hash built in the following way:
$names{ $ID } = $your_name;
I want to l want to list in
print $query->popup_menu( -name=>'Emp',
-values=> \%who,
-default=> \%who,
);
but in alphabetically. How
Jess Balint wrote:
>
> I remember reading something once that detailed using 'formats' or something
> like that. I don't remember what it was called, but I looked something like
> this: <<<@
>
> How is this used? Thanks. ~Jess
perldoc perlform
John
--
use Perl;
progra
On Fri, 2002-05-17 at 12:01, drieux wrote:
>
> On Friday, May 17, 2002, at 07:59 , Scot Needy wrote:
>
> > I turned on debug in perl5/5.00503/sun4-solaris/DynaLoader.pm
> > $dl_debug = 1;
> >
> > Turns out it WAS scanning /path/to/modules/SunOS/5.6
> > Just not /path/to/modules/SunOS/5.6/$arch/a
I think what you're looking for is 'format'. Check out 'perldoc perlform'.
-Original Message-
From: Balint, Jess [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 1:11 PM
To: '[EMAIL PROTECTED]'
Subject: Unknown Name
I remember reading something once that detailed using 'formats'
I remember reading something once that detailed using 'formats' or something
like that. I don't remember what it was called, but I looked something like
this: <<<@
How is this used? Thanks. ~Jess
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mai
Francesco Guglielmo wrote:
>
Subject: Who debug me?
Let Perl help you help yourself
> That's the problem:
>
> #!/usr/bin/perl
use warnings;
# use diagnostics; # for extra help
use strict;
> my $file = '/home/users/francesco/LISTAORDINATA.txt';
> my $outfile = '/home/users/francesco/Perl/f
Thanks for the reply Shaun
that worked perfect
I guess being a web master you ran into this problem with CGI ;-)
Jaime
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Harry Jackson wrote:
>
> > -Original Message-
> > From: Ned Cunningham [mailto:[EMAIL PROTECTED]]
> T Nobel
> >
> > I am trying to replace the spaces with a single space
> >
> > My code so snippet is:
> >
> > $cuname = $data[53];
> >
> > $newcuname = /" "+/" "/$cuname;
>
> This i
Ned Cunningham wrote:
>
> Can anyone give me a hand please?
> I have a file
>
> James T Nobel
> James T. Nobel, Jr.
> James and Kathy Nobel
> James T Nobel
> James T Nobel
>
> I am trying to replace the spaces with a single space
>
> My code so snippet is:
>
> $cuname = $data[53]
On Thursday, May 16, 2002, at 08:41 , Alan Drew wrote:
> You could try using shell - the module tha allows you to use shell
> commands as subroutines. e.g:
>
> use shell;
> $uptime = uptime();
> print $uptime;
>
just had time to peek at this - and use shell is
essentially a wrapper around
Ack sorry I meant to say the first if statement catches repeating NON Alpha
characters... such as "%%"
-Original Message-
From: Batchelor, Scott [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 1:18 PM
To: 'Jackson, Harry'; [EMAIL PROTECTED]
Subject:RE: Help please
The first if Statement I am checking for Repeating characters such as "aa"
"%%"
In the second if statement I am that there are at least 2 non-alpha
characters in the first 8 letters.
I hope this explains it a bit better...
Again, Thanks in advance.
Scott
Some Questions
> -Original Messa
> -Original Message-
> From: bob ackerman [mailto:[EMAIL PROTECTED]]
>
>
>
> On Friday, May 17, 2002, at 09:40 AM, Batchelor, Scott wrote:
>
> > /([^a-zA-Z])\1/
>
> did you mean to be checking for repeating non-alpha characters?
> if you are testing with repeating alpha characters,
Some Questions
> -Original Message-
> From: Batchelor, Scott [mailto:[EMAIL PROTECTED]]
> Sent: 17 May 2002 17:40
> To: '[EMAIL PROTECTED]'
> Subject: Help please
>
>
> Can anyone tell me why the heck my if statements aren't
> working in this
> subroutine. Everything else seems to wor
On Friday, May 17, 2002, at 09:40 AM, Batchelor, Scott wrote:
> /([^a-zA-Z])\1/
did you mean to be checking for repeating non-alpha characters?
if you are testing with repeating alpha characters, that test won't catch
it.
On Friday, May 17, 2002, at 09:34 , Adam Morton wrote:
[..]
>
>
> my $x = 17;
>
> package A;
> $x = 12;
>
> package B;
> $x = 20;
>
> # $x is now 20.
> # $A::x and $B::x are still undefined
and as you notice there is almost no way to make
t
On Friday, May 17, 2002, at 08:40 AM, VINCENT BUFFERNE wrote:
> I am using vec($foo1, $foo2, $foo3). It seems that the value of $foo3 is
> limited to 2048 (with perl 5.004 or perl 5.6.1). Is it possible to use
> wider
> values: up to 60,000 ???
are you sure it is limited? i don't have a test
> -Original Message-
> From: Adam Morton [mailto:[EMAIL PROTECTED]]
> > >
> > >
> > > use strict;
> > >
> > > my $link_id = '';
> > > my $link_attr_entry_list_ref = '';
> >
> > The var above is in the package::main name space.
>
>
> Are you saying that $link_id and $link_attr_entry_li
Hi -
Mayb...
if ($usr == $usr1) {print "$usr $pass $email\n";}
'==' is a NUMERIC compare, 'eq' is the corresponding alphanumeric compare.
So:
if ($usr eq $usr1) {print "$usr $pass $email\n";}
or (to ignore case):
if (lc $usr eq lc $usr1) {print "$usr $pass $email\n";}
-Origin
Can anyone tell me why the heck my if statements aren't working in this
subroutine. Everything else seems to work fine.
Please excuse the debug code...
sub 'pass_verify_syntax {
print "Sub Called\n";
my($p) = @_;
length($p) < $pwmin &&
print "Password too short. Minimum is $pwmin chara
- Original Message -
From: "Jackson, Harry" <[EMAIL PROTECTED]>
> > -Original Message-
> > From: [EMAIL PROTECTED]
>
> >
> >
> >
> > use strict;
> >
> > my $link_id = '';
> > my $link_attr_entry_list_ref = '';
>
> The var above is in the package::main name space.
Are you saying
On Friday, May 17, 2002, at 09:17 , Francesco Guglielmo wrote:
>
> Where is my error?
> I suppose in the "if".
> I want to print $usr $pass $email
well I personally would have started with
#!/usr/bin/perl -w
use strict;
I also like to be a bit more explict on splits
On Thursday, May 16, 2002, at 11:49 , Prachi Shroff wrote:
[..]
without knowing which compiler - these would be hard to run to ground.
but we will try to help a bit here..
I think nmake environment is having an issue with
# --- MakeMaker constants section:
AR_STATIC_ARGS = cr
That's the problem:
#!/usr/bin/perl
my $file = '/home/users/francesco/LISTAORDINATA.txt';
my $outfile = '/home/users/francesco/Perl/file/usrpasswdemail.txt';
my $file2 = '/home/users/francesco/Perl/file/peralberto.txt';
open (OUT, ">$outfile");
open (INPUTEMAIL, "$file2");
# open (INPUTPA
Perl includes a special escape that stands for any whitespace character,
which is "\s". Thus, you can simplify your regex by using:
$cuname =~ s/\s+/ /; #replace one or more whitespace chars with a space
What I have done is used the s/// (substitution) operator to substitute one
space for o
#uh. suppose you have
$cuname = "James T Nobel";
#you want to do this probably
$cuname =~ s/\s+/ /g;
> -Original Message-
> From: Ned Cunningham [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 17, 2002 12:15 PM
> To: '[EMAIL PROTECTED]'
> Subject: Regex a name field
>
>
>
> -Original Message-
> From: Ned Cunningham [mailto:[EMAIL PROTECTED]]
T Nobel
>
> I am trying to replace the spaces with a single space
>
> My code so snippet is:
>
> $cuname = $data[53];
>
> $newcuname = /" "+/" "/$cuname;
This is probably a little but not much closer to
Can anyone give me a hand please?
I have a file
James T Nobel
James T. Nobel, Jr.
James and Kathy Nobel
James T Nobel
James T Nobel
I am trying to replace the spaces with a single space
My code so snippet is:
$cuname = $data[53];
$newcuname = /" "+/" "/$cuname;
But it isnt worki
On Friday, May 17, 2002, at 07:59 , Scot Needy wrote:
> I turned on debug in perl5/5.00503/sun4-solaris/DynaLoader.pm
> $dl_debug = 1;
>
> Turns out it WAS scanning /path/to/modules/SunOS/5.6
> Just not /path/to/modules/SunOS/5.6/$arch/auto
>
> I moved /path/to/modules/SunOS/5.6/$arch/auto
> to
> print SENDMAIL <<"EOF";
> From: Root
> To: Unix Admin <$unixadm>
> Subject: $subject
> Hello
> $text
> EOF
You have to have an extra new line after the Subject such as follows.
--
print SENDMAIL <<"EOF";
From: Root
To: Unix Admin <$unixadm>
Subject: $subject
Hello
$text
I am using vec($foo1, $foo2, $foo3). It seems that the value of $foo3 is
limited to 2048 (with perl 5.004 or perl 5.6.1). Is it possible to use wider
values: up to 60,000 ???
Thanks,
Vincent
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Friday, May 17, 2002, at 08:02 , Postman Pat wrote:
> What I meant is test to see if we were run from an interactive shell, if
> so, print an error message.
assume
code_A calls Code_B
if code_A has not 'daemonized' and detached from
the controlling terminal - then the (-t STDIN) w
Hello fellow perl enthusiasts
I want to be able to open a Mail File Handle
and have seperate file go this Mail File Handle
I have some code like this:
---
#!/util/perl5.static -w
$unixadm = "hourihj";
$report = "/etc/passwd";
$hostname = qx(/usr/ucb/hos
I turned on debug in perl5/5.00503/sun4-solaris/DynaLoader.pm
$dl_debug = 1;
Turns out it WAS scanning /path/to/modules/SunOS/5.6
Just not /path/to/modules/SunOS/5.6/$arch/auto
I moved /path/to/modules/SunOS/5.6/$arch/auto
to /path/to/modules/SunOS/5.6/auto and everything now works!
Key Debu
On Friday, May 17, 2002, at 07:50 , drieux wrote:
> my $count = 1;
> foreach my $line (@INC) {
> print "($count) $line\n";
> $count++;
> }
perchance an illustration may help here:
[jeeves:~/bin] drieux% rshAround "uname -a ; atInc"
going to vladimi
See Perl Cookbook Section 15.2. Should be of help.
-Original Message-
From: Postman Pat [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 11:02 AM
To: Bob Showalter
Cc: [EMAIL PROTECTED]
Subject: RE: Test how we were executed
What I meant is test to see if we were run from an intera
What I meant is test to see if we were run from an interactive shell, if
so, print an error message.
LK
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> -Original Message-
> From: drieux [mailto:[EMAIL PROTECTED]]
>
>
>
> On Friday, May 17, 2002, at 02:35 , Jackson, Harry wrote:
>
> >
> > get_link_priority(get_link_attr_entry_list($link_id);
>
> --^
>
> one ) short of a full li
On Friday, May 17, 2002, at 07:31 , Scot Needy wrote:
> Still have a problem with this.
> In my perl code I can add to @INC one of 2 ways.
>
> use lib "/path/to/modules/SunOS/5.6"
>
> OR
>
> BEGIN {
> use POSIX qw(uname);
> my ($uname_s, $uname_r) = (POSIX::uname())[0,2];
> unshift(@INC,
On Friday, May 17, 2002, at 02:35 , Jackson, Harry wrote:
>
> get_link_priority(get_link_attr_entry_list($link_id);
--^
one ) short of a full lisp
{-8 "the devil made me do that..." 8-}
ciao
drieux
---
ooh, oooh...
--
To unsubscri
> -Original Message-
> From: Postman Pat [mailto:[EMAIL PROTECTED]]
>
>
> Greetings,
> I want to write a script that will check to see if it was called from
> another script, if not it will display a message saying for
> instance this
> script is meant to be called from other script &
Hi All,
Still have a problem with this.
In my perl code I can add to @INC one of 2 ways.
use lib "/path/to/modules/SunOS/5.6"
OR
BEGIN {
use POSIX qw(uname);
my ($uname_s, $uname_r) = (POSIX::uname())[0,2];
unshift(@INC, "/path/to/modules/$uname_s/$uname_r" );
}
If I use the BEGIN
Do you have a file called service .pm in \perl\site\lib\win32?
-Original Message-
From: Khoury, Chris C SEOP-OEIRN
To: '[EMAIL PROTECTED]'
Sent: 5/17/02 2:25 AM
Subject: Getting "Can't locate Win32/Service.pm"
Whilst using;
use Win32::Service;
Any ideas on how to diagnose?
Chris Kho
On Friday, May 17, 2002, at 04:23 , Jackson, Harry wrote:
>> -Original Message-
>> From: drieux [mailto:[EMAIL PROTECTED]]
>>
>> On Thursday, May 16, 2002, at 02:05 , Harry Jackson wrote:
>>
>>> Does anyone have any other things that would be good practice in most
>>> scripts.
>>
>> BEGIN
> -Original Message-
> From: Postman Pat [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 17, 2002 2:27 AM
> To: [EMAIL PROTECTED]
> Subject: Test how we were executed
>
>
> Greetings,
> I want to write a script that will check to see if it was called from
> another script, if not it will
The usual way add an " " (i.e newline) in perl is to use \n .
eg
$hello="hello\n";
print $hello;
prints hello followed by a new line. I assume this is what you mean by
""
A.
On Friday, May 17, 2002, at 02:04 PM, Jerry Preston wrote:
> Hi!
>
> Can perl deal with vx or vmx? I can access "tip
On Friday, May 17, 2002, at 07:04 , Jerry Preston wrote:
> Hi!
we can trade here...
> Can perl deal with vx or vmx? I can access "tip hardwire", but lose
> control
> because I do not know to do an that is required. I need to be
> able
> and reset the controller clock. I have tried to tel
On Thursday, May 16, 2002, at 11:27 , Postman Pat wrote:
> Greetings,
> I want to write a script that will check to see if it was called from
> another script, if not it will display a message saying for instance this
> script is meant to be called from other script & not run interactively for
>
Hi!
Can perl deal with vx or vmx? I can access "tip hardwire", but lose control
because I do not know to do an that is required. I need to be able
and reset the controller clock. I have tried to telnet into the controller
via vx, bit I have idea on what commands to use.
Thanks,
Jerry
--
warning note: daemonology comes in two basic catagories
a) standard system type daemons
b) distributed networking solutions
AKA: OLTP systems, enterprise solutions,
for the first class syslog is ok enough - especially as gary
notes that one can modify the syslo
>-Original Message-
>From: drieux [mailto:[EMAIL PROTECTED]]
>
>On Thursday, May 16, 2002, at 02:05 , Harry Jackson wrote:
>
>> Does anyone have any other things that would be good practice in most
>> scripts.
>
>BEGIN { } cf p465 3rd Edition
>
>cf p481ff for a discussion on this an
Hi -
Just tried this:
use strict;
use Win32::Service;
my %services;
if (Win32::Service::GetServices ('', \%services)) {
print "$_\n" for (sort keys %services);
}
else {
print "GetServices failed\n";
}
It wo
> -Original Message-
> From: Alan Drew [mailto:[EMAIL PROTECTED]]
> > On Thursday, May 16, 2002, at 05:44 PM, Timothy Johnson wrote:
> >
> >> ... Yesterday I even caught myself
> >> writing code on a piece of napkin on my lunch
> >>
> > I have been doing that for years - just not wi
On Thursday, May 16, 2002, at 06:55 PM, Artur F. Pimentel wrote:
> Hello All:
>
> Is there some way to configure the @INC in perl enviroment?
>
There are two woys that I know of... but I am no expert!
You can either re-build perl, as *I think* @INC is determined at compile
time; You can als
Sorry - sent this to the wrong addy by mistake..
:O)
A.
>
> On Thursday, May 16, 2002, at 05:44 PM, Timothy Johnson wrote:
>
>> ... Yesterday I even caught myself
>> writing code on a piece of napkin on my lunch
>>
> I have been doing that for years - just not with perl. I always find
> the
> -Original Message-
> From: [EMAIL PROTECTED]
>
>
>
> use strict;
>
> my $link_id = '';
> my $link_attr_entry_list_ref = '';
The var above is in the package::main name space.
>
>
> get_link_attr_entry_list($link_id);
> get_link_priority($link_attr_entry_list_ref);
>
>
Whilst using;
use Win32::Service;
Any ideas on how to diagnose?
Chris Khoury
Operational Support
Shell International Petroleum Company Limited
Shell Centre, London SE1 7NA, United Kingdom
Tel: +44 (0)20 7934 4190 Fax: 7351
Email:
Internet: http://www.shell.com
--
To unsubscribe, e-mail: [E
[EMAIL PROTECTED] wrote:
> Hi there,
>
> I would like to transfer an array-reference from sub "get_link_attr_entry_list"
> to sub "get_link_priority", but it doesn't work.
> Here is the code:
>
> use strict;
>
> my $link_id = '';
> my $link_attr_entry_list_ref = '';
>
>
> get_link_attr_entry
Hi there,
I would like to transfer an array-reference from sub "get_link_attr_entry_list"
to sub "get_link_priority", but it doesn't work.
Here is the code:
use strict;
my $link_id = '';
my $link_attr_entry_list_ref = '';
get_link_attr_entry_list($link_id);
get_link_priority($link_attr
>-Original Message-
>From: Chris Ball [mailto:[EMAIL PROTECTED]]
>
>I've submitted a documentation patch on this and it's been applied to
>the 5.8 tree. There'll be mention of perltoc as a good place to start
>on the `perldoc perldoc` page in that release.
I was very tempted to buy Pro
On Thursday 16 May 2002 11:47 pm, drieux wrote:
[snip]
> the problem is that it closes both stdin and stderr, which are
> used by other things we play with and need to be appropriately
> reopened to some place other than the terminal we are no
> longer talking to...
>
> I'm all in favor of clutter
on Fri, 17 May 2002 01:32:54 GMT, Fjohnson wrote:
> The error I am getting with this version of the code is
> the following:
> DBD::Sybase::st execute failed: Server message number=170
> severity=150 state=1 line=1 server='hostname' text=Line1: Incorrect
> syntax near ')' . at dbi.pl line 27, li
80 matches
Mail list logo