System will fork a second shell process from the parent and wait for a
response when the child process exits (which sounds like what you want).
This is not so efficient as exec which kills the parent process.
For system:
my $return = system (my_script, my_argument);
Will start a child process an
Hi all,
Here is what I have so far for this...
use strict;
# cannot remember syntax for "use warnings but no 'uninitialized'
my ($album, @upc_list);
my @data_src = parse_data();
print "Data Source: ";
print "$_ " foreach @data_src;
print "\n";
# test
my $album1 = $album->{$upc_list[0]};
fore
Hello,
I have a question, how to insert binary data into the table by MySql DBI
module ?
Thanks
Michal Weinfurtner
I know this has been asked before, but I can't seem to find it.
Is there a simple way to remove duplicates from an array.
Currently I sort the array, and then iterate through the sorted array,
and push elements into a new array when its different than the previous
one. I have read somewhere of a on
>I know this has been asked before, but I can't seem to find it.
>Is there a simple way to remove duplicates from an array.
>Currently I sort the array, and then iterate through the sorted array,
>and push elements into a new array when its different than the previous
>one. I have read somewhere of
keys{%{{map {$_=>$_}(@array)}});
-Original Message-
From: Marius Roets [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 7:29 AM
To: [EMAIL PROTECTED]
Subject: Removing duplicates in arrays
I know this has been asked before, but I can't seem to find it.
Is there a simple way to
Good Evening all .
I'm experiencing to write a perl script for to make backup with afio
under perl .
But a have some problem when try to execute the system command with the
" @_ " this seem to be not the right way for exec this system command
"i'm not sure" .
but in past time i'm used this kind
You have to have 'blob' filed in your database?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
I am using Mail::Bulkmail module version 3.09 for mail functionality in one of my
scripts. The
script generates and sends around 4000 mails in a span of 3 hours and at the end of
the script
there is one last summary mail being sent.
But at this point, the Bulkmail generates an error saying
Hi All,
I need to write a script that cooperates with a bunch of other scripts
in the 'toolbox' paradigm which is often thought of as a core tenet of
UNIX philosophy. In particular, when my script fails, the other
scripts will look in $? and based on the number therein they will
perform some
you can use the exit function like so:
#!/usr/bin/perl -wT
blah..;
if (it worked){
exit(0);
} else {
exit(100);
}
On Wed, Oct 22, 2003 at 10:41:15AM -0500, Jason wrote:
> Hi All,
>
> I need to write a script that cooperates with a bunch of other scripts
> in the 'toolbo
On Wednesday 22 Oct 2003 4:41 pm, Jason wrote:
> Hi All,
>
> I need to write a script that cooperates with a bunch of other scripts
> in the 'toolbox' paradigm which is often thought of as a core tenet of
> UNIX philosophy. In particular, when my script fails, the other
> scripts will look in $? a
> Hi,
>
> I am using Mail::Bulkmail module version 3.09 for mail functionality
in one of my scripts. The
> script generates and sends around 4000 mails in a span of 3 hours and
at the end of the script
> there is one last summary mail being sent.
> But at this point, the Bulkmail generates an er
Kevin Pfeiffer <[EMAIL PROTECTED]> wrote:
: Where I am stuck is on the question:
:
: Given an @array such as
: ("Title of Song", "Artist", "Title", "Another Artist", "etc"),
: is there an easy way to strip out the quotation marks.
s/"//g foreach @array;
HTH,
Charles K. Clarkson
--
Head
In article <[EMAIL PROTECTED]>, Charles K. Clarkson
wrote:
> Kevin Pfeiffer <[EMAIL PROTECTED]> wrote:
>
> : Where I am stuck is on the question:
> :
> : Given an @array such as
> : ("Title of Song", "Artist", "Title", "Another Artist", "etc"),
> : is there an easy way to strip out the quotation
Hi All,
I am trying to automate some stuff, which requires me to login through serial
interfaces on Solaris 8. I have searched CPAN with no luck, and the following code
producess tip non-interrective error. Any ideas ??
Thanks in advance,
Mark G.
midjump# cat ./console
#!/usr/local/bin/perl
I have a file formatted like this:
#error0
# This indicates that there was no
# error whatsoever.
#error0
#error1
# You have specified no arguments,
# so the program ran the 'PrintHelp'
# subroutine and then died.
#error1
#error2
# If you do not specify a type, then
# there is no way
In article <[EMAIL PROTECTED]>, Kevin Pfeiffer wrote:
> In article <[EMAIL PROTECTED]>, Charles K. Clarkson
> wrote:
>
>> Kevin Pfeiffer <[EMAIL PROTECTED]> wrote:
>>
>> : Where I am stuck is on the question:
>> :
>> : Given an @array such as
>> : ("Title of Song", "Artist", "Title", "Another A
On Wed, Oct 22, 2003 at 12:59:33PM -0500, Jason wrote:
> I have a file formatted like this:
[ snip ]
> #error12
> # Couldn't set the transfer mode to binary.
> #error12
>
> I want to write code that searches for an error number, and then
> prints everything in between the two error number lab
On Wed, Oct 22, 2003 at 02:26:50PM -0400, Steve Grazzini wrote:
> #!/usr/bin/perl
> #
> # [ untested ]
> #
And it shows... :/
> die "Usage: $0 ERROR\n" unless @ARGV;
>
> my $num = shift;
> my $rx = qr/^#error$num$/;
>
> while (<>) {
> my $range = /$rx/ .. /$rx/;
You'd a
Kevin Pfeiffer <[EMAIL PROTECTED]> wrote:
: What I came up with (by trying instead of just asking): ;-)
:
: # removes leading and trailing quote marks
: s/^"|"$//g foreach @pairs;
It might be more efficient to use two statements like the
faq does with leading and trailing space.
foreach (
I need to remove ./ and #from a list of files. I can do it in sed but I am
not able to use it in my perl script. I tried to do something like this
chomp ($txtlist = );
qx' sed -e "/^#/d $txtlist'; # To remove lines starting with a #
qx' sed -e"s?\([ /]\)\./?\1?g" $txtlist; # To remove lines star
In article <[EMAIL PROTECTED]>, Raghu Murthy wrote:
> I need to remove ./ and #from a list of files. I can do it in sed but I am
> not able to use it in my perl script. I tried to do something like this
>
> chomp ($txtlist = );
> qx' sed -e "/^#/d $txtlist'; # To remove lines starting with a #
>
PerlDiscuss - Perl Newsgroups and mailing lists wrote:
Please do not post to this group under false e-mail addresses. Replies to
such addresses bring about server error messages. This wastes the time of
people who are willingly giving of their time to help others. If you persist
in such behavio
In article <[EMAIL PROTECTED]>, Kevin Pfeiffer wrote:
> In article <[EMAIL PROTECTED]>, Raghu Murthy wrote:
>
>> I need to remove ./ and #from a list of files. I can do it in sed but I
>> am not able to use it in my perl script. I tried to do something like
>> this
>>
>> chomp ($txtlist = );
>>
Hello...
I am booting a FreeBSD system from the network via PXE.
On that FreeBSD system is Perl 5.005.
I want to use the IO::Socket::INET module in a script on that system. (But
I'd settle for Socket.pm)
The kicker is that the entire root filesystem must be less than 50 megs.
The other kic
--On Wednesday, October 22, 2003 16:24 -0600 "McMahon, Chris"
<[EMAIL PROTECTED]> wrote:
Can anyone suggest either: a way to make IO::Socket::INET work in
the simplest possible way on 5.005; or a way to install the
smallest possible 5.8; or something I haven't thought of?
Any suggestion (no matt
Another crazy idea.
> -Original Message-
> From: McMahon, Chris [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 22, 2003 3:24 PM
> To: [EMAIL PROTECTED]
> Subject: help with Very Small Perl?
>
>
>
>
> Hello...
> I am booting a FreeBSD system from the network via PXE.
> On that
Hello,
I'm a total newbie with only a few programs under my belt. Anyway, I
would like to create a command line calculator. Like the one available
in python.
The python interpreter will accept 5+5 or 5 + 5.
I would like some ideas on how to parse the command line. I can read it
in as STDIN, b
On Wed, 22 Oct 2003 13:42:55 -0400
[EMAIL PROTECTED] wrote:
> Hi All,
>
>I am trying to automate some stuff, which requires me to login
>through serial interfaces on Solaris 8. I have searched CPAN with
>no luck, and the following code producess tip non-interrective
>error. Any id
Hi All,
How do i know the full name of a variable from its reference??.
Say i have a routine defined like this:
package Bar;
sub foo {};
And then i say:
my $x = \&foo;
Now from this coderef ($x) i want to know its fully qualified name which would be
somthing like Bar::Foo.
Is there a way to
Goffredo Saffioti wrote:
Good Evening all .
I'm experiencing to write a perl script for to make backup with afio
under perl .
But a have some problem when try to execute the system command with the
" @_ " this seem to be not the right way for exec this system command
"i'm not sure" .
but in pas
Jeff Borders wrote:
Hello,
I'm a total newbie with only a few programs under my belt. Anyway, I
would like to create a command line calculator. Like the one available
in python.
The python interpreter will accept 5+5 or 5 + 5.
I would like some ideas on how to parse the command line. I can rea
On Thu, 2003-10-23 at 10:21, Jeff Borders wrote:
> Hello,
>
> I'm a total newbie with only a few programs under my belt. Anyway, I
> would like to create a command line calculator. Like the one available
> in python.
>
> The python interpreter will accept 5+5 or 5 + 5.
Perl will as well... he
Gupta, Sharad wrote:
Hi All,
How do i know the full name of a variable from its reference??.
Say i have a routine defined like this:
package Bar;
sub foo {};
And then i say:
my $x = \&foo;
Now from this coderef ($x) i want to know its fully qualified name which would be somthing like Bar::Foo.
On Wed, Oct 22, 2003 at 08:22:47PM -0500, Wiggins d'Anconia wrote:
> Gupta, Sharad wrote:
>> Now from this coderef ($x) i want to know its fully qualified name
>> which would be somthing like Bar::Foo. Is there a way to do that.??.
>
> Where do you want to know it? Presumably if you have set it th
I can't store it somewhere. I have a routine to which a user can pass a coderef.
And in that routine i want to know the full name of that coderef.
-Sharad
> -Original Message-
> From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 22, 2003 6:23 PM
> To: Gupta, Shar
H!!. I am spinning ;)
I'll look at B.
The problem was i wanted to know the name of the coderef to generate an error message.
Thanx,
-Sharad
> -Original Message-
> From: Steve Grazzini [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 22, 2003 6:58 PM
> To: Wiggins d'Anconia
> Cc:
Gupta, Sharad wrote:
I can't store it somewhere. I have a routine to which a user can pass a coderef.
And in that routine i want to know the full name of that coderef.
-Sharad
But in that case isn't it just a design issue, to me it would make more
sense to pass the name of the routine and call it
Gupta, Sharad wrote:
H!!. I am spinning ;)
I'll look at B.
The problem was i wanted to know the name of the coderef to generate an error message.
Ahh... again depending on your use you may want to have a look at:
perldoc -f caller
If you haven't, it is very affective for creating traces
How can I test the status of $sth itself?
A scenario is that a $sth is passed from a sub. And now, I have a $sth. Of
course $sth->rows return 0 or whatever int row. However, a test using
$sth->rows is not good when something is wrong. It return some large
number. So How can I test to see if its ba
Hi there,
Did anyone send free SMS mobile messages from Perl under Windows
environment ? If yes, can you please share your "how to ?"
Thanks heaps.
Best regards,
Praveen
IMPORTANT-
(1) The contents of this email and its attachments are confidential and
intended only for the individual o
42 matches
Mail list logo