[28895] in Perl-Users-Digest
Perl-Users Digest, Issue: 139 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 15 11:10:23 2007
Date: Thu, 15 Feb 2007 08:09:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 15 Feb 2007 Volume: 11 Number: 139
Today's topics:
Re: Become more productive with Vista Speech Recognitio <zentara@highstream.net>
Re: define a standard exception handler to handle datab <Peter@PSDT.com>
Re: define a standard exception handler to handle datab <greg.ferguson@icrossing.com>
Geting Windows NT services and drives. <findingAri@gmail.com>
IMAP Mail Filtering / Moving ?? jerryyang_la1@yahoo.com
Re: Make 1.5 million in 10 minutes <dowilly@aolestonia.com>
pattern serach over many files pavan734@gmail.com
Re: pattern serach over many files <tadmc@augustmail.com>
Re: pattern serach over many files pavan734@gmail.com
Re: pattern serach over many files <wahab-mail@gmx.de>
Re: pattern serach over many files <noreply@gunnar.cc>
Re: pattern serach over many files pavan734@gmail.com
Re: pattern serach over many files pavan734@gmail.com
Re: pattern serach over many files <wahab-mail@gmx.de>
Re: Perl interaction with Expect <glennj@ncf.ca>
Perl takes a lot of memory when you just require a file <jain.nsit@gmail.com>
re: problem CGI read request POST <john.swilting@wanadoo.fr>
Re: problem CGI <john.swilting@wanadoo.fr>
Re: problem CGI <john.swilting@wanadoo.fr>
Re: problem CGI <john.swilting@wanadoo.fr>
Re: Problem with system command <nospam@nospam.com>
script for http request <rfrench5@gmail.com>
Re: script for http request <glex_no-spam@qwest-spam-no.invalid>
Re: The future! I can see the future! Nay, I can hear i <ldolan@bigpond.net.au>
Uninstall a module? <tlundrigan@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 15 Feb 2007 11:55:02 GMT
From: zentara <zentara@highstream.net>
Subject: Re: Become more productive with Vista Speech Recognition.
Message-Id: <dbi8t2pgc54s049lkjs72pjo3mv19mkanr@4ax.com>
On Wed, 14 Feb 2007 20:32:17 +0100, Michele Dondi
<bik.mido@tiscalinet.it> wrote:
>On Wed, 14 Feb 2007 13:48:17 GMT, zentara <zentara@highstream.net>
>wrote:
>
>>After viewing this video, I'm sure you will be running to
>>get your copy of Vista. :-)
>>
>>
>>http://www.youtube.com/watch?v=KyLqUf4cdwc
>
>I was faster than you:
>
>news:hco5t2h5k3oflvams9467nv1bb5vpof63e@4ax.com
>
>
>;-) Michele
Doh, I'm getting old and slow. :-)
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
------------------------------
Date: Thu, 15 Feb 2007 14:01:16 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: define a standard exception handler to handle database query faults
Message-Id: <pan.2007.02.15.14.01.14.439485@PSDT.com>
On Thu, 15 Feb 2007 00:15:39 -0800, Filippo wrote:
> my application is designed this way:
>
> open a database connection at beginning
>
> my $productionDatabase = DBI->connect(
[...]
> I want that any database query fails (prepare, execute, fetchrow, do
> etc) cause my application to die in case I don't want to manage the
> error. As second step I want to cactch some errors in order to recover
> from exception (ask the user to check the network connection and retry
> the query...).
http://search.cpan.org/~timb/DBI-1.53/DBI.pm#HandleError
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
------------------------------
Date: 15 Feb 2007 08:03:26 -0800
From: "gf" <greg.ferguson@icrossing.com>
Subject: Re: define a standard exception handler to handle database query faults
Message-Id: <1171555406.878046.187350@m58g2000cwm.googlegroups.com>
On Feb 15, 1:15 am, "Filippo" <filippo2...@virgilio.it> wrote:
> hi,
>
> my application is designed this way:
>
> open a database connection at beginning
>
> my $productionDatabase = DBI->connect(
> "DBI:PgPP:dbname=$DATABASE_NAME;host=$DATABASE_SERVER;port=5432",
> "postgres",
> "postgres",
> {
> RaiseError => 1}
> ) or die (
> "failed onnection failed: $DBI::errstr"
> );
>
> then keep open the connection and query database when needeed
>
> my $sth = $dbh->prepare($sqlQuery);
> $sth->execute;
> my $result = $sth->fetchrow_arrayref;
>
> I want that any database query fails (prepare, execute, fetchrow, do
> etc) cause my application to die in case I don't want to manage the
> error. As second step I want to cactch some errors in order to recover
> from exception (ask the user to check the network connection and retry
> the query...).
The DBI allows us to pass default settings for PrintError, RaiseError,
AutoCommit. Those are your general fallback when you want the DBI to
handle problems.
If you want to change the default behavior, wrap the code in a {}
block, and use local to create a temporary overriding instance of the
variable, and set it to what you need it to be.
The DBI docs talk about temporarily overriding those behaviors.
------------------------------
Date: 15 Feb 2007 05:05:35 -0800
From: "490" <findingAri@gmail.com>
Subject: Geting Windows NT services and drives.
Message-Id: <1171544735.847461.109020@j27g2000cwj.googlegroups.com>
Hi.
I am trying to get win NT services and drives detailes.
I used the code:
'WINMSD /f' ;
'set >info.txt';
And then i go through the details and get what i want form the txt
file.
The problem is that this is a very ugly way and it uses alot of CPU &
Memory Usage.
Does any body have a better and faster way?!
Thanks
490.
------------------------------
Date: 15 Feb 2007 06:22:53 -0800
From: jerryyang_la1@yahoo.com
Subject: IMAP Mail Filtering / Moving ??
Message-Id: <1171549373.521514.235350@m58g2000cwm.googlegroups.com>
System running : Windows 2003 Server - ActivePerl, PHP, ASP, Mercury32
Are there any scripts (PHP, PERL) that can be used to move IMAP mail
from one folder (inbox) to another folder (junk, spam, kept) ??
Ideally looking at subject or headers ??
My aim would be to call this from Mercury32 and have the script move
the mail to the correct folder in a users mail box..
Thanks
------------------------------
Date: Thu, 15 Feb 2007 07:43:47 -0600
From: Dowilly Dummfucc <dowilly@aolestonia.com>
Subject: Re: Make 1.5 million in 10 minutes
Message-Id: <2235456.kTSVsx8RER@aol.com>
Ha Ha. I made 1 billion in 1 second. Find out how. www.google.com
Virgin Mobile wrote:
> Find out how Roy . Made over 1 million in 10 minutes.
>
> http://alberta-oilsands.blogspot.com/2007/02/oil-and-gas.html
------------------------------
Date: 15 Feb 2007 03:13:26 -0800
From: pavan734@gmail.com
Subject: pattern serach over many files
Message-Id: <1171538006.748061.312500@h3g2000cwc.googlegroups.com>
Hi,
Suppose I have got 3 files like this
file1.txt file2.txt file3.txt
abc gsywg wrtw
def abc abc hshs dhwu wwg
dadq aft hhs gtc ffs
abc ttsg abc hhshh abc
Assume that all the files are of same no. of lines
I need a script that compares each line of all the files for the
pattern "abc" and print the number of lines not containing the pattern
"abc" in all the files
In the above example, the script must print 1 because only 3rd line of
all the files is not containing the pattern "abc". I think you
understood my question, if not pls ask me again, I will eloborate more.
------------------------------
Date: Thu, 15 Feb 2007 05:53:47 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: pattern serach over many files
Message-Id: <slrnet8ieb.n1v.tadmc@tadmc30.august.net>
pavan734@gmail.com <pavan734@gmail.com> wrote:
> Hi,
> Suppose I have got 3 files like this
>
> file1.txt file2.txt file3.txt
> abc gsywg wrtw
> def abc abc hshs dhwu wwg
> dadq aft hhs gtc ffs
> abc ttsg abc hhshh abc
>
> Assume that all the files are of same no. of lines
>
> I need a script that compares each line of all the files for the
> pattern "abc" and print the number of lines not containing the pattern
> "abc" in all the files
>
> In the above example, the script must print 1 because only 3rd line of
> all the files is not containing the pattern "abc". I think you
> understood my question, if not pls ask me again, I will eloborate more.
----------------------
#!/usr/bin/perl
use warnings;
use strict;
my @file1 = ('abc', 'def abc', 'dadq aft', 'abc ttsg');
my @file2 = ('gsywg', 'abc hshs', 'hhs gtc', 'abc hhshh');
my @file3 = ('wrtw', 'dhwu wwg', 'ffs', 'abc');
my $cnt=0;
foreach my $i ( 0 .. $#file1 ) {
next if $file1[$i] =~ /abc/;
next if $file2[$i] =~ /abc/;
next if $file3[$i] =~ /abc/;
$cnt++;
}
print "$cnt\n";
----------------------
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 15 Feb 2007 04:39:35 -0800
From: pavan734@gmail.com
Subject: Re: pattern serach over many files
Message-Id: <1171543175.200254.245710@l53g2000cwa.googlegroups.com>
On Feb 15, 4:53 pm, Tad McClellan <t...@augustmail.com> wrote:
> pavan...@gmail.com <pavan...@gmail.com> wrote:
> > Hi,
> > Suppose I have got 3 files like this
>
> > file1.txt file2.txt file3.txt
> > abc gsywg wrtw
> > def abc abc hshs dhwu wwg
> > dadq aft hhs gtc ffs
> > abc ttsg abc hhshh abc
>
> > Assume that all the files are of same no. of lines
>
> > I need a script that compares each line of all the files for the
> > pattern "abc" and print the number of lines not containing the pattern
> > "abc" in all the files
>
> > In the above example, the script must print 1 because only 3rd line of
> > all the files is not containing the pattern "abc". I think you
> > understood my question, if not pls ask me again, I will eloborate more.
>
> ----------------------
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> my @file1 = ('abc', 'def abc', 'dadq aft', 'abc ttsg');
> my @file2 = ('gsywg', 'abc hshs', 'hhs gtc', 'abc hhshh');
> my @file3 = ('wrtw', 'dhwu wwg', 'ffs', 'abc');
>
> my $cnt=0;
> foreach my $i ( 0 .. $#file1 ) {
> next if $file1[$i] =~ /abc/;
> next if $file2[$i] =~ /abc/;
> next if $file3[$i] =~ /abc/;
> $cnt++;
>
> }
>
> print "$cnt\n";
> ----------------------
>
> --
> Tad McClellan SGML consulting
> t...@augustmail.com Perl programming
> Fort Worth, Texas- Hide quoted text -
>
> - Show quoted text -
I think you have misunderstood. file1 name is file1.txt and `abc',
'def abc', 'dadq aft', `abc ttsg' are its contents. Similarly for
file2.txt and file3.txt. Note that the contents can be anything and my
real application files are containing as many as 2000 lines.
------------------------------
Date: Thu, 15 Feb 2007 12:40:26 +0100
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: pattern serach over many files
Message-Id: <er1km1$qg5$1@mlucom4.urz.uni-halle.de>
pavan734@gmail.com wrote:
> Hi,
> Suppose I have got 3 files like this
>
> file1.txt file2.txt file3.txt
> abc gsywg wrtw
> def abc abc hshs dhwu wwg
> dadq aft hhs gtc ffs
> abc ttsg abc hhshh abc
>
> Assume that all the files are of same no. of lines
>
> I need a script that compares each line of all the files for the
> pattern "abc" and print the number of lines not containing the pattern
> "abc" in all the files
>
> In the above example, the script must print 1 because only 3rd line of
> all the files is not containing the pattern "abc". I think you
> understood my question, if not pls ask me again, I will eloborate more.
use strict;
use warnings;
my $term = qr/abc/;
open my $f1, '<', 'file1.txt';
open my $f2, '<', 'file2.txt';
open my $f3, '<', 'file3.txt';
my ($count, $line);
while( ! eof($f1) and ! eof($f2) and ! eof($f3) ) {
my @lines = (scalar <$f1>, scalar <$f2>, scalar <$f3>);
++$line;
print ++$count, ". # $line\n" unless grep /$term/, @lines;
}
print "Total: $count\n";
Regards
M.
------------------------------
Date: Thu, 15 Feb 2007 15:03:57 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: pattern serach over many files
Message-Id: <53j7elF1sljmkU1@mid.individual.net>
pavan734@gmail.com wrote:
> On Feb 15, 4:53 pm, Tad McClellan <t...@augustmail.com> wrote:
>>pavan...@gmail.com <pavan...@gmail.com> wrote:
<homework assignment snipped>
<solution snipped>
> I think you have misunderstood. file1 name is file1.txt and `abc',
> 'def abc', 'dadq aft', `abc ttsg' are its contents. Similarly for
> file2.txt and file3.txt.
Then adapt the solution accordingly!
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 15 Feb 2007 06:16:01 -0800
From: pavan734@gmail.com
Subject: Re: pattern serach over many files
Message-Id: <1171548961.910440.54390@v33g2000cwv.googlegroups.com>
On Feb 15, 4:40 pm, Mirco Wahab <wahab-m...@gmx.de> wrote:
> pavan...@gmail.com wrote:
> > Hi,
> > Suppose I have got 3 files like this
>
> > file1.txt file2.txt file3.txt
> > abc gsywg wrtw
> > def abc abc hshs dhwu wwg
> > dadq aft hhs gtc ffs
> > abc ttsg abc hhshh abc
>
> > Assume that all the files are of same no. of lines
>
> > I need a script that compares each line of all the files for the
> > pattern "abc" and print the number of lines not containing the pattern
> > "abc" in all the files
>
> > In the above example, the script must print 1 because only 3rd line of
> > all the files is not containing the pattern "abc". I think you
> > understood my question, if not pls ask me again, I will eloborate more.
>
> use strict;
> use warnings;
>
> my $term = qr/abc/;
>
> open my $f1, '<', 'file1.txt';
> open my $f2, '<', 'file2.txt';
> open my $f3, '<', 'file3.txt';
>
> my ($count, $line);
> while( ! eof($f1) and ! eof($f2) and ! eof($f3) ) {
> my @lines = (scalar <$f1>, scalar <$f2>, scalar <$f3>);
> ++$line;
> print ++$count, ". # $line\n" unless grep /$term/, @lines;
> }
>
> print "Total: $count\n";
>
> Regards
>
> M.- Hide quoted text -
>
> - Show quoted text -
Thank you.
------------------------------
Date: 15 Feb 2007 06:24:55 -0800
From: pavan734@gmail.com
Subject: Re: pattern serach over many files
Message-Id: <1171549495.221471.84790@v45g2000cwv.googlegroups.com>
On Feb 15, 4:40 pm, Mirco Wahab <wahab-m...@gmx.de> wrote:
> pavan...@gmail.com wrote:
> > Hi,
> > Suppose I have got 3 files like this
>
> > file1.txt file2.txt file3.txt
> > abc gsywg wrtw
> > def abc abc hshs dhwu wwg
> > dadq aft hhs gtc ffs
> > abc ttsg abc hhshh abc
>
> > Assume that all the files are of same no. of lines
>
> > I need a script that compares each line of all the files for the
> > pattern "abc" and print the number of lines not containing the pattern
> > "abc" in all the files
>
> > In the above example, the script must print 1 because only 3rd line of
> > all the files is not containing the pattern "abc". I think you
> > understood my question, if not pls ask me again, I will eloborate more.
>
> use strict;
> use warnings;
>
> my $term = qr/abc/;
>
> open my $f1, '<', 'file1.txt';
> open my $f2, '<', 'file2.txt';
> open my $f3, '<', 'file3.txt';
>
> my ($count, $line);
> while( ! eof($f1) and ! eof($f2) and ! eof($f3) ) {
> my @lines = (scalar <$f1>, scalar <$f2>, scalar <$f3>);
> ++$line;
> print ++$count, ". # $line\n" unless grep /$term/, @lines;
> }
>
> print "Total: $count\n";
>
> Regards
>
> M.- Hide quoted text -
>
> - Show quoted text -
One more question.. kindly answer. How should the code change if I
want to print the number of lines of each file containg the pattern
"abc". Again I should get the answer 1 because only 4th line of all
the files is containing the pattern "abc"
------------------------------
Date: Thu, 15 Feb 2007 16:44:15 +0100
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: pattern serach over many files
Message-Id: <er1vei$an$1@mlucom4.urz.uni-halle.de>
pavan734@gmail.com wrote:
> One more question.. kindly answer. How should the code change if I
> want to print the number of lines of each file containg the pattern
> "abc". Again I should get the answer 1 because only 4th line of all
> the files is containing the pattern "abc"
Change one line
# old
# print ++$count, ". # $line\n" unless grep /$term/, @lines;
# new
print ++$count, ". # $line\n" if 3 == grep /$term/, @lines;
"unless grep" means:
if 0 == grep ...
so we change that to
if 3 == grep ...
in order to find lines w/all three occurrences
M.
------------------------------
Date: 15 Feb 2007 15:36:33 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: Perl interaction with Expect
Message-Id: <slrnet8vg2.cf3.glennj@smeagol.ncf.ca>
At 2007-02-14 03:54PM, "Eric" wrote:
[...]
answered in comp.lang.tcl
--
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry
------------------------------
Date: 15 Feb 2007 04:56:40 -0800
From: "RJ" <jain.nsit@gmail.com>
Subject: Perl takes a lot of memory when you just require a file
Message-Id: <1171544200.067595.287090@l53g2000cwa.googlegroups.com>
I am decompiling some data from my C code which can be used by Perl
programs later on. My Data structure is something like follows -
struct tDs{
char *tName;
int *data;
}
struct DS{
int index;
char *rName;
<list> tDs;
}
I am decompiling above data in a perl file (which I generate from C
code) as follows
<generated_file.pl>
pass_data_from_perl_to_c (index1,rName,{"tName1" => "data1" , "tName2"
=> "data2"});
The last argument in above function call is a hasg referemce to list
of values associated with various objects of type tDs for index
index1.
First of all, if I just do a `require "<generated_file.pl>" ` it takes
a lot of memory (around 4Mb for 2 Mb file even if I do just a return
after entering pass_data_from_perl_to_c and populate no Data).
If I do populate data in form of 3-D array is perl memory requirement
is 5 times than expected.
Can someone Please explain me why this is so and how I can avoid
spending unnecessary memory taken by require.
Waiting for a quick reply.
-RJ
------------------------------
Date: Thu, 15 Feb 2007 16:42:47 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: re: problem CGI read request POST
Message-Id: <45d47f6a$0$27403$ba4acef3@news.orange.fr>
how to read a whole a requete post to extract the arguments there
------------------------------
Date: Thu, 15 Feb 2007 16:04:30 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem CGI
Message-Id: <45d47672$0$27407$ba4acef3@news.orange.fr>
john.swilting wrote:
> john.swilting wrote:
>
>> Michele Dondi wrote:
>>
>>> On Wed, 14 Feb 2007 13:36:51 +0100, "john.swilting"
>>> <john.swilting@wanadoo.fr> wrote:
>>>
>>>>you cannot help me too a little more perldoc cgi me
>>>
>>> A little more? No I can't. I can help you a little less: try the
>>> param() function/method.
>>>
>>>
>>> HTH,
>>> Michele
>> I will find myself with hundreds of -> param(' ')
> I should not make a loop for on all the data of the form
I carried out some small tests and there is only 1 parameter which is master
key with the script how to let to know which and to know that value I do
not know how to make
------------------------------
Date: Thu, 15 Feb 2007 16:16:05 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem CGI
Message-Id: <45d47929$0$25931$ba4acef3@news.orange.fr>
john.swilting wrote:
> john.swilting wrote:
>
>> john.swilting wrote:
>>
>>> Michele Dondi wrote:
>>>
>>>> On Wed, 14 Feb 2007 13:36:51 +0100, "john.swilting"
>>>> <john.swilting@wanadoo.fr> wrote:
>>>>
>>>>>you cannot help me too a little more perldoc cgi me
>>>>
>>>> A little more? No I can't. I can help you a little less: try the
>>>> param() function/method.
>>>>
>>>>
>>>> HTH,
>>>> Michele
>>> I will find myself with hundreds of -> param(' ')
>> I should not make a loop for on all the data of the form
> I carried out some small tests and there is only 1 parameter which is
> master key with the script how to let to know which and to know that value
> I do not know how to make
#!/usr/bin/perl -w
use strict;
use diagnostics;
use CGI qw/:standard escapeHTML/;
use Data::Dumper;
my $cgi = new CGI;
my $one = $cgi->param('commander1');
##my $two = $cgi->param('commander2');
my $dumper1 = print Dumper $one;
##my $dumper2 = print Dumper $two;
sub AFFICHAGE{
my($one) = @_;
print header();
print start_html("Dumper");
print p("fileinfo",tt(escapeHTML($dumper1)));
## print p("fileinfo",tt(escapeHTML($dumper2)));
print end_html();
}
AFFICHAGE($one);
perl /var/www/cgi-bin/ventedumper ? commander1=1
it always answer me the same thing with different values with the param
------------------------------
Date: Thu, 15 Feb 2007 16:17:30 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: problem CGI
Message-Id: <45d4797e$0$25931$ba4acef3@news.orange.fr>
john.swilting wrote:
> john.swilting wrote:
>
>> john.swilting wrote:
>>
>>> john.swilting wrote:
>>>
>>>> Michele Dondi wrote:
>>>>
>>>>> On Wed, 14 Feb 2007 13:36:51 +0100, "john.swilting"
>>>>> <john.swilting@wanadoo.fr> wrote:
>>>>>
>>>>>>you cannot help me too a little more perldoc cgi me
>>>>>
>>>>> A little more? No I can't. I can help you a little less: try the
>>>>> param() function/method.
>>>>>
>>>>>
>>>>> HTH,
>>>>> Michele
>>>> I will find myself with hundreds of -> param(' ')
>>> I should not make a loop for on all the data of the form
>> I carried out some small tests and there is only 1 parameter which is
>> master key with the script how to let to know which and to know that
>> value I do not know how to make
> #!/usr/bin/perl -w
> use strict;
> use diagnostics;
> use CGI qw/:standard escapeHTML/;
> use Data::Dumper;
>
> my $cgi = new CGI;
>
> my $one = $cgi->param('commander1');
> ##my $two = $cgi->param('commander2');
> my $dumper1 = print Dumper $one;
> ##my $dumper2 = print Dumper $two;
> sub AFFICHAGE{
> my($one) = @_;
> print header();
> print start_html("Dumper");
>
> print p("fileinfo",tt(escapeHTML($dumper1)));
>
> ## print p("fileinfo",tt(escapeHTML($dumper2)));
> print end_html();
> }
>
> AFFICHAGE($one);
> perl /var/www/cgi-bin/ventedumper ? commander1=1
> it always answer me the same thing with different values with the param
perl /var/www/cgi-bin/ventedumper.cgi?commander=1
------------------------------
Date: Thu, 15 Feb 2007 14:43:08 -0000
From: "Vic Russell" <nospam@nospam.com>
Subject: Re: Problem with system command
Message-Id: <er1rlm$hgv$1$8300dec7@news.demon.co.uk>
Hi Michele,
I only used Notepad as a specific example. Actually we are using a document
differencing program but it was significant that Notepad caused the same
symptoms.
"Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
news:ni9ns2lg7e8uk5ukr7hp6kvejllefegbjt@4ax.com...
> On Thu, 8 Feb 2007 17:36:49 -0000, "Vic Russell" <nospam@nospam.com>
> wrote:
>
>>If I shutdown my program whilst leavin (in this case) Notepad running and
>>restart it again it exhibits strange behaviour. If I shut down Notepad
>>before running the program again, all is OK. It is a little difficult to
>>describe the "strange behaviour" here (it would take a lot of text) but my
>
> Yet, it would be interesting to know what it is. By any chance, may
> this be an instance of the infamous unicode bug also described on np's
> page @ Wikipedia:
>
> http://en.wikipedia.org/wiki/Notepad#Unicode_detection
>
> ?
>
>>simple question is; how do I completely disassociate the system launched
>>application from my program in order to avoid this problem?
>
> I think some Win32 specific module would be a better bet.
>
>
> Michele
> --
> {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
> (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
> .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
> 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: 15 Feb 2007 07:39:28 -0800
From: "RogerF" <rfrench5@gmail.com>
Subject: script for http request
Message-Id: <1171553967.838671.277050@k78g2000cwa.googlegroups.com>
Hello... don't do alot of perl scripting so I am not well experienced
with scripting...
I want to return the values from a simple http request in a perl
script.
So for example, if I have a http request on a server such as:
http://<server>/servlet/inbasket?RDUSER=pfuser&FUNCTION=gettasks
And the return of the URL is:
<?xml version="1.0" ?>
- <INBASKET>
<USERTASKS userid="" returnmsg="No tasks set up for workflow user
pfuser" msgtype="Error" />
</INBASKET>
I want to take the returnmsg value ("No tasks set up for workflow user
pfuser") from the request and send it to an email recipient.
Just looking for the syntax of the Http request and how to get the
return values
require HTTP::Request;
$request = HTTP::Request->new(GET => 'http://<server>/servlet/inbasket?
RDUSER=pfuser&FUNCTION=gettasks');
...
...
...
$response = $ua->request($request)
if ($response->is_success) {
print $response->content;
}
else {
print STDERR $response->status_line, "\n";
********************************************************************
So how do I get the value of returnmsg??? Can I somehow parse out
'content'??
Needing just a little help to get this syntax correct.
Thanks in advance for your assistance.
-Roger
------------------------------
Date: Thu, 15 Feb 2007 09:53:15 -0600
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: script for http request
Message-Id: <45d481c3$0$702$815e3792@news.qwest.net>
RogerF wrote:
[...]
> So for example, if I have a http request on a server such as:
>
> http://<server>/servlet/inbasket?RDUSER=pfuser&FUNCTION=gettasks
>
> And the return of the URL is:
>
> <?xml version="1.0" ?>
> - <INBASKET>
> <USERTASKS userid="" returnmsg="No tasks set up for workflow user
> pfuser" msgtype="Error" />
> </INBASKET>
[...]
> So how do I get the value of returnmsg??? Can I somehow parse out
> 'content'??
>
> Needing just a little help to get this syntax correct.
>
> Thanks in advance for your assistance.
It's XML, of course it can be parsed. Take a look at XML::Simple, on
CPAN (http://search.cpan.org/)
------------------------------
Date: Thu, 15 Feb 2007 14:03:23 GMT
From: dysgraphia <ldolan@bigpond.net.au>
Subject: Re: The future! I can see the future! Nay, I can hear it!
Message-Id: <LKZAh.1552$4c6.214@news-server.bigpond.net.au>
Michele Dondi wrote:
> http://www.youtube.com/watch?v=KyLqUf4cdwc
>
>
> Michele
Thanks Michele!...$very++ -> $phunny
Cheers, Peter
------------------------------
Date: 15 Feb 2007 07:30:46 -0800
From: "Tracey" <tlundrigan@gmail.com>
Subject: Uninstall a module?
Message-Id: <1171553446.226628.310630@a75g2000cwd.googlegroups.com>
Hi all,
I force installed DBD::mysql when I shouldn't have and have broken
just about everything I had running on this particular server. I'm
getting 'perl:relocation error' all over the place. Any idea how I
restore this or uninstall it and get my server back to normal?
Thanks.
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 139
**************************************