thanks for the help ...
i tried
system("/usr/bin/fetchmail -aK -f /tmp/$uid.rc")==0 or die "command failed:
$!($?)\n";
but still, does not display the exit code ...
any suggestion?
> On Dec 4, J-E-N said:
>
> >below is my script but its not working as it should
> >
> >system("command") or di
Hi,
I am facing the following problem. If anybody knows the answer then please let me know.
Problem Description:
When the perl script on WCS side receives a packet from the NRS then it redirects to a
page. Depending upon whether the agent is available and wait time out is non-zero, the
perl scri
On Dec 4, J-E-N said:
>below is my script but its not working as it should
>
>system("command") or die "command failed: $?\n";
system() returns 0 on SUCCESS, not failure.
system("command") == 0 or die "command failed: $! ($?)";
perldoc -f system
--
Jeff "japhy" Pinyan [EMAIL PROTECTED
below is my script but its not working as it should
system("command") or die "command failed: $?\n";
what will i do so that my script will display an error once the system
command failed?
thanks :)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECT
Hi Brett,
Thanks a lot. Where can I find exmaples for using Expect.pm, please?
Brett W. McCoy wrote:
> On Mon, 3 Dec 2001, Ahmed Moustafa wrote:
>
>
>>I used to use Expect http://expect.nist.gov/ for dealing with
>>interactive programs i.e. Telnet and FTP.
>>
>>Expect lets you interact with r
On Tue, 4 Dec 2001, Daniel Falkenberg wrote:
> Hi All,
>
> while(1) {
> #Read from a sub outside of the while loop...
> get_sub();
> }
>
> get_sub {
> print $test;
> }
>
> I understand that the above code doesn't really say much but it gives a
> brief understading of my problem. Baiscally
On Mon, 3 Dec 2001, Ahmed Moustafa wrote:
> I used to use Expect http://expect.nist.gov/ for dealing with
> interactive programs i.e. Telnet and FTP.
>
> Expect lets you interact with running process as if it was a file.
>
> Does Perl have something like that i.e. writing a Perl script which
> in
Hi All,
while(1) {
#Read from a sub outside of the while loop...
get_sub();
}
get_sub {
print $test;
}
I understand that the above code doesn't really say much but it gives a
brief understading of my problem. Baiscally when I compile the script I
get a compilation error saying...
Name "
On Dec 4, Hasanuddin Tamir said:
>Taken from perlfaq4,
>
>s/(_)/++$c <= $count ? '' : $1/ge;
Hrm, why not:
s/(_)/++$c > $count && $1/ge;
since it's DOCUMENTED that > returns '' for false.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother
Hi All,
I used to use Expect http://expect.nist.gov/ for dealing with
interactive programs i.e. Telnet and FTP.
Expect lets you interact with running process as if it was a file.
Does Perl have something like that i.e. writing a Perl script which
interacts with another process?
Your help wil
On Mon, 3 Dec 2001, Mark Hanson <[EMAIL PROTECTED]> wrote,
> Hi gurus!
>
> I want to use the quantifier {COUNT}? in the following program to remove the first
>three underscores. I'm trying to avoid a loop. I have not been able to figure out the
>syntax.
>
> $a = "The_quick_brown_fox_jumped_ov
Hi gurus!
I want to use the quantifier {COUNT}? in the following program to remove the first
three underscores. I'm trying to avoid a loop. I have not been able to figure out the
syntax.
$a = "The_quick_brown_fox_jumped_over_the_lazy_dog.";
$count = "3";
$a =~ s/(_{$count}?)//;
print "\n$a\n
Been a while since I had to do this... you need 'zeller congruence', an
arithmetic formula to convert date to day-of-week (circa late 1800's
IIRC). Google says 475 hits -- Rich
On Mon, 3 Dec 2001, C.E.O. wrote:
> Date: Mon, 3 Dec 2001 13:25:18 -0600
> From: C.E.O. <[EMAIL PROTECTED]>
> To: [EMAI
On Mon, 3 Dec 2001, Tyler Longren wrote:
> I have a HUGE document full of very simple SQL queries. Each query only
> takes up one line in the file. How could I get every individual line of SQL
> and execute it? I know how to query MySQL in perl, so that's fine...I just
> don't know how to get
On Mon, 3 Dec 2001, Dean Theophilou wrote:
> I'm using Perl to set a password and a coworker of mine is using
> VB to call my program. The problem is that the person who will end op
> running the VB program does not have access to the directory where
> passwords are stored. So, I figured,
Hello,
I have a HUGE document full of very simple SQL queries. Each query only
takes up one line in the file. How could I get every individual line of SQL
and execute it? I know how to query MySQL in perl, so that's fine...I just
don't know how to get the individual lines to execute.
Thanks e
Thomas Wright wrote:
>
> Hi folks.
>
> I need to select a single file name from a list of filenames and assign it
> to a variable.
>
> I currently do this in a few shell scripts using: $last_file=`ls -1r
> somedata_file.dat.*.orig | head -1`
If you translate this to perl it becomes:
my $last_
Hi Brett:
I'm using Perl to set a password and a coworker of mine is using VB to call my
program. The problem is that the person who will end op running the VB program
does not have access to the directory where passwords are stored. So, I
figured, I'll use Perl to do the job, since I c
Mark Hanson wrote:
>
> Hi!
>
> Yet another hash question:
>
> How can I permanently modify a hash key? I have the following hash:
>
> my %hash = (
> hygiene_products_total_amount => {
> 'conditioner' => "5",
> 'shampoo' => "57",
> '
On Mon, 3 Dec 2001, Dean Theophilou wrote:
> I would like to exit a perl program such that upon exiting, it will return a
> text string to the calling program. How would I go about doing this?
>
> exit $SomeTextString;
>
> doesn't work, since "exit" evaluates the above scalar as an integer
> -Original Message-
> From: Dean Theophilou [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 03, 2001 5:07 PM
> To: Perl_beginner (E-mail)
> Subject: Returning a text string
>
>
> Hello:
>
> I would like to exit a perl program such that upon
> exiting, it will return a
> text
Hello:
I would like to exit a perl program such that upon exiting, it will return a
text string to the calling program. How would I go about doing this?
exit $SomeTextString;
doesn't work, since "exit" evaluates the above scalar as an integer. Thank you
in advance.
Dean Theophilou
Ge
> -Original Message-
> From: Wright, Thomas [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 03, 2001 3:15 PM
> To: Beginners (E-mail)
> Subject: system `ls` or File::Find?
>
>
> Hi folks.
>
> I need to select a single file name from a list of filenames
> and assign it
> to a variab
> -Original Message-
> From: Mark Hanson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 03, 2001 4:42 PM
> To: [EMAIL PROTECTED]
> Subject: add hash to hash of hash
>
>
> Hi,
>
> Still more hash questions:
>
> using the example in chapter 9 of Programming Perl:
>
> %HoH = (
>
Just off the top of my head: {'pierce'} by itself is not a hash, is it? A
hash is a set of key/value pairs, so a single value cannot be a hash.
> -Original Message-
> From: Mark Hanson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 03, 2001 4:42 PM
> To: [EMAIL PROTECTED]
> Subject:
Hi,
Still more hash questions:
using the example in chapter 9 of Programming Perl:
%HoH = (
flintstones => {
husband=>"fred",
pal=>"barney",
},
);
how can dynamically add another hash to %HoH? In Programming Perl, they have a hard
coded example
Monday, December 03, 2001, 8:14:48 PM, Wright, Thomas wrote:
WT> When I do this in Perl thusly:
WT> $oldfile = `system "ls -1r $oldfile.\*.orig | head -1"`;
you want to use system *or* backticks, not both.
$oldfile = `ls|head`;
should do the trick
here's something that will do it just in
Hi folks.
I need to select a single file name from a list of filenames and assign it
to a variable.
I currently do this in a few shell scripts using: $last_file=`ls -1r
somedata_file.dat.*.orig | head -1`
The "*" represents a timestamp in the filename. This allows me to select the
most recent
My company uses a custom workweek that begins
at Midnight on Saturday and ends on Friday at 23:59:59.99.
I need a subroutine that can take as input a workweek (12, 26, 36)
and take as input a year (2002, 2003, 2004) all in the same
operation. Then I need the subroutine to return values as
cus
On Mon, Dec 03, 2001 at 03:00:39PM +, Sean Patterson wrote:
> I just started learning Perl. I need help in writing a solution for the
> following:
>
[ ..zap.. ]
>
> foreach $line (@list) {
> ($time, $url, $title)=split(/|/, $line); # this does not seem to work
You have t
On Mon, Dec 03, 2001 at 09:10:25AM -0800, tom poe wrote:
> Hi: I am running SuSE7.1 with perl5.6.0 default install. Directory =
> /usr/bin/perl
>
> I went to CPAN, and ran install::perl, or something, and now have perl5.6.1
> installed in: /usr/local/bin/perl
>
> Well, this has led to a lot
At 12:41 PM 12/3/01 -0600, Mark Hanson wrote:
>How can I permanently modify a hash key?
Delete the original element and add a new one.
($newkey = $oldkey) =~ s/foo/bar/;
$hash{$newkey} = delete $hash{$oldkey};
This isn't something I find myself doing at all often. Doing so *m
Hi!
Yet another hash question:
How can I permanently modify a hash key? I have the following hash:
my %hash = (
hygiene_products_total_amount => {
'conditioner' => "5",
'shampoo' => "57",
'soap' => "1",
I looked in PPM, but could not find a package that seemed to match.
I am looking for a package that helps access the IP info on a windows
machine.
Any direction or help would be great. Thanks.
Craig
[EMAIL PROTECTED]
Pager
Numeric: 1-877-895-3558
Email pager: [EMAIL PROTECTED]
---
On Mon, 3 Dec 2001, Jorge Goncalvez <[EMAIL PROTECTED]> wrote,
> Hi, I wonder How to delete all files under a directory in Perl
> Thanks.
This one does it, but not recursively, and only real files, not
directories.
perl -e 'unlink <*>'
san
--
Trabas - http://www.trabas.com
--
To unsubsc
On Dec 3, Jorge Goncalvez said:
>Hi, I wonder How to delete all files under a directory in Perl
use File::Path;
rmtree(["/some/directory"]);
perldoc File::Path
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.or
Hi, I wonder How to delete all files under a directory in Perl
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi: I am running SuSE7.1 with perl5.6.0 default install. Directory =
/usr/bin/perl
I went to CPAN, and ran install::perl, or something, and now have perl5.6.1
installed in: /usr/local/bin/perl
Well, this has led to a lot of confusion for @INC. Seems like one of the
options is to install e
I use the WIn32::EventLog and I wonder how to delete all event logs elements
I have this code:
#!/usr/local/bin/perl -w
use Win32::EventLog;
use File::stat;
use File::Find;
use strict;
my ($Event, @timearray, $filename,
$day, $month, $directory, $logfile, $fileage);
my $retrycount = 0;
#
I just started learning Perl. I need help in writing a solution for the
following:
# Write data validation routines to -
# Ignore blank lines...
# Ignore comments...
# Ignore complete pod sections
# Process the following data, as described:
792910171010163200|http://web
I just started learning Perl. I need help in writing a solution for the
following:
# Write data validation routines to -
# Ignore blank lines...
# Ignore comments...
# Ignore complete pod sections
# Process the following data, as described:
792910171010163200|http://we
On Mon, 3 Dec 2001, Mei Leng Lee wrote:
> I'm trying to pass some parameters from one script to another. I know
> there's some perl module which can do that. But it's not install in the
> system and I don't have the permission to install it either. Is there any
> other way to do it?
Pass them in
Does anyone know of a wrapper that could be put around
a ksh script, run as a child of a perl script, that
could update the %ENV hash with the chages made by the
ksh script.
Michael McQuarrie
__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo
We have a Unix server for our internet applications, but I am reluctant to
do development work on it, being so new to Perl and we do not have another
Unix server. Can I write and test CGI applications on a Novelle server? If
so, what would I need to do - just install Perl on the server and then ca
> I'm trying to pass some parameters from one script to another. I know
> there's some perl module which can do that. But it's not install in
> the system and I don't have the permission to install it either. Is
> there any other way to do it?
>
> Virginia
You don't need access to the common li
hi all,
i have two questions, and would appriciate if someone could tell
me where i can find answers to them.
1. what is a structure and where i can find information
on what a structure is (as used in the code below)
2. how does the following line work: $SummaryPerWeek+=
i.e. how is th
Hi, I had just subscribed this list.
I made a perl script that uses Threads and external command
(system() function). It uses to run fine at an linux machine with 2.2.16
kernel and Perl 5.6.1.
I had migrated this script to another machine with linux and 2.4.7
kernel, but st
On Sunday 02 December 2001 11:43 am, [EMAIL PROTECTED] wrote:
> I'm just trying to tell if dbi itself is installed or not. I guess I have
> to go to the mysql site and download it, but do I install the DBI for perl
> or since I am using mysql *just* the specified DBD for mysql? That's what
> is
Our web server enables us to use 'SafePerl' for CGI scripts. I can find
little information relating to this, and what subset of Perl commands are
enabled (or correctly, which commands are disabled).
Can anyone point me in the right direction?
Julian
--
To unsubscribe, e-mail: [EMAIL PROTECTED
Hi,
I'm trying to pass some parameters from one script to another. I know
there's some perl module which can do that. But it's not install in the
system and I don't have the permission to install it either. Is there any
other way to do it?
Virginia
--
To unsubscribe, e-mail: [EMAIL PROTECTE
From: Michael Fowler <[EMAIL PROTECTED]>
> On Fri, Nov 30, 2001 at 10:24:24AM -0600, Kanchana Weerasinghe wrote:
> > I have a problem using Mail::Mailer with a Bcc in the headerthe
> > recipient (To) can see the Bcc field in the email header.
>
> This is a problem with your MTA (mail transpor
Hanson wrote:
>
> Hi!
>
> I need to remove the first n underscores from various
> strings if there are more than two currently present in the
> string. The total number of underscores will vary. For
> example, if I have the following strings:
>
> $a = "Now_is_the_time_for_all"
> $b = "The_quick
52 matches
Mail list logo