Thanks for hint Mike. I think now I will be able to proceed.
-Original Message-
From: Mike Ward [mailto:m...@farematrix.com]
Sent: Thursday, January 08, 2009 9:59 PM
To: beginners@perl.org
Subject: Re: How to know no. of times the script has been executed?
sanket vaidya wrote:
>
> H
Hi all,
I am invoking dos using
system 'start cmd /k echo Welcome'
in my script
Now I want following:
If user types exit on does screen
{
do something
}
How to check whether user types 'exit' on dos screen.
Also I want
If user closes the cmd window (by clickin 'x')
{
do something
}
root wrote:
The following script gives me confusing results.
I've not delved into OOP before and am surprised when something
appears to work but gives wrong answers.
Explicitly Digest::MD5's md5_hex gives wrong answers if called as
Digest::MD5->md5_hex. OK, I've figured out that it shou
Jenda Krynicky wrote:
> From: Gunnar Hjalmarsson
>> Steve Bertrand wrote:
>>> Fúlvio Figueirôa wrote:
I solved my problem using sendmail with the code below:
open (MAIL, "|/usr/sbin/sendmail -t ");
print MAIL "From: someaddr...@somedomain\n";
print MAIL "To: someaddre...@s
On Thu, Jan 8, 2009 at 14:10, Mike McClain wrote:
> On Thu, Jan 08, 2009 at 01:52:02AM +, Rob Dixon wrote:
>> Chas. Owens wrote:
>> > File::Find::find(
>>
>> File::Find exports find() by default. It is better either to use the import
>> or
>> to prevent it altogether with
>>
>> use File::Fi
On Thu, Jan 8, 2009 at 17:47, root wrote:
>The following script gives me confusing results.
> I've not delved into OOP before and am surprised when something
> appears to work but gives wrong answers.
>Explicitly Digest::MD5's md5_hex gives wrong answers if called as
> Digest::MD5->md5_hex
On Thu, Jan 08, 2009 at 01:52:02AM +, Rob Dixon wrote:
> Chas. Owens wrote:
> > File::Find::find(
>
> File::Find exports find() by default. It is better either to use the import or
> to prevent it altogether with
>
> use File::Find ();
>
> in the first place.
>
> Rob
In what way is it be
The following script gives me confusing results.
I've not delved into OOP before and am surprised when something
appears to work but gives wrong answers.
Explicitly Digest::MD5's md5_hex gives wrong answers if called as
Digest::MD5->md5_hex. OK, I've figured out that it shouldn't be calle
I have 'Programming Perl' and 'Learning Perl' and was fortunate
enough to get 2 copies of 'Perl Cookbook' for Christmas, one of
which I plan to return for exchange. After looking over O'Reilly's
offerings I've narrowed my choices to these:
Mastering Perl By brian d foy
Perl Best Practices B
sanket vaidya wrote:
>
> Hi all,
>
> I want to do something like this.
>
> Invoke a cmd (using system command) print a welcome message & execute the
> remaining part of script.
>
> Now what I want is
> 1. cmd should only be invoked with welcome message if the script is
> executed first tim
On Jan 8, 3:56 am, andrew.tayl...@hmrcaspire.com (Andrew Taylor)
wrote:
> Hello
>
> I have a script that is (at one point) reading through a file. The file
> is processed line by line and each line split into an array like so:
>
> while (<$TESTFILE>)
>
> {
>
> my $cur_line=$_;
>
> chomp ($cur_
That was easier:
#!/usr/bin/perl
use strict;
use warnings;
#my $line = "1elem21elema2a 1 bad13elema2eone 1 bad 1elemb2bone 2
bad1elemc2c13elemc2btwo13elemb2etwo13elem2";
my $line = "a < bade1 < bad b1 >
badcb2e2";
my $cnt = 0;
my @insides = $line =~ m{ (.*?)<\/elem1> }gmsx;
for my $inside (
What happens if I have a simple string:
my $line = "1elem21elema2a 1 bad13elema2 1 bad elemb2 bad 2 z
1elemc2c13elemc2b13elemb2e13elem2";
That must follow simply rules:
Find every alpha character string between the numbers one and two. The string
may not include the number one two or three.
SO
From: Gunnar Hjalmarsson
> Steve Bertrand wrote:
> > Fúlvio Figueirôa wrote:
> >> I solved my problem using sendmail with the code below:
> >>
> >> open (MAIL, "|/usr/sbin/sendmail -t ");
> >> print MAIL "From: someaddr...@somedomain\n";
> >> print MAIL "To: someaddre...@somedomain\n";
> >> print
From: "Taylor, Andrew \(ASPIRE\)"
> I have a script that is (at one point) reading through a file. The file
> is processed line by line and each line split into an array like so:
>
> while (<$TESTFILE>)
> {
> my $cur_line=$_;
> chomp ($cur_line);
while (defined(my $cur_line = <$TESTFILE>))
On Thu Jan 08 2009 @ 11:56, Taylor, Andrew (ASPIRE) wrote:
> # In a number of places, I have code that looks like the following.
>
>
>
> my $default_type;
>
>
>
> if( $split_line[0] eq "DEFAULT_INPUT" )
>
> {
>
> $default_type = "INPUT";
>
> }
> This works OK, but I'm tryin
On Thu, 2009-01-08 at 11:56 +, Taylor, Andrew (ASPIRE) wrote:
> This works OK, but I'm trying to avoid declaring variables seperately
> from assigning them (wherever possible), and trying to keep the size
> of
> the script down without losing human legibility.
>
> Is there a neater/cleverer
Hello
I have a script that is (at one point) reading through a file. The file
is processed line by line and each line split into an array like so:
while (<$TESTFILE>)
{
my $cur_line=$_;
chomp ($cur_line);
my @split_line = split( /$t_delim/, $cur_line );
# In a numbe
> On Jan 6, 5:32 pm, rc...@pcug.org.au (Owen) wrote:
>> > Hi,
>>
>> > I have perl5.10.0 installed under C:/ and using bash prompt to run
>> a
>> >makecommand.
>>
>> How are you doing that?
>>
>>
>>
>> > When I issue themakecommandit throws error
>>
>> > "Perl Script not found" C:/Program no such fi
On Jan 6, 5:32 pm, rc...@pcug.org.au (Owen) wrote:
> > Hi,
>
> > I have perl5.10.0 installed under C:/ and using bash prompt to run a
> >makecommand.
>
> How are you doing that?
>
>
>
> > When I issue themakecommandit throws error
>
> > "Perl Script not found" C:/Program no such file or directory
>
20 matches
Mail list logo