RE: sort function?

2004-03-24 Thread Charles K. Clarkson
Radhika Sambamurti <[EMAIL PROTECTED]> wrote: : : my question is - where did the very first line from my : output come from? ie Mon Mar 15 15:55:58. As you can see, : ls -l does not show any file created at that time. Even : . and .. are not the above time. : Is it using sort(@array), that sorts i

sort function?

2004-03-24 Thread Radhika Sambamurti
Hi, I have written a small script that is supposed to tell me the oldest file in my directory (as per ctime). I have read the various times the various files were created, into an array called times. I have then sorted this array - @sorted_times. when i do ls -l i get the following: wxrwxr-x 1

Re: references

2004-03-24 Thread Wiggins d Anconia
> i know this should be a simple step or two that i'm missing, and i > haven't been able to figure it out from reading yet... > > i have the following code: > > $sth = $mysql_dbh->prepare("select subroutine_pointer from > $database.equipment_manufacturer where > manufacturer=\"$remedy_eqp

RE: references

2004-03-24 Thread Guay Jean-Sébastien
Hello Joe, > i have the following code: > > $sth = $mysql_dbh->prepare("select subroutine_pointer from > $database.equipment_manufacturer where > manufacturer=\"$remedy_eqpt_mfgr\""); > $sth->execute(); > $subroutine_pointer = $sth->fetchrow_array(); > no strict "refs"; >

references

2004-03-24 Thread Joe Mecklin
i know this should be a simple step or two that i'm missing, and i haven't been able to figure it out from reading yet... i have the following code: $sth = $mysql_dbh->prepare("select subroutine_pointer from $database.equipment_manufacturer where manufacturer=\"$remedy_eqpt_mfgr\"");

RE: Locatiing Self-Installed Modules

2004-03-24 Thread Ron Goral
> -Original Message- > From: Bob Showalter [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 23, 2004 10:03 AM > To: 'Ron Goral'; Perl Beginners > Subject: RE: Locatiing Self-Installed Modules > > > Ron Goral wrote: > > Sorry, not sure what "bottom post" means. > > It means posting your ne

Re: QUERY_STRING

2004-03-24 Thread WC -Sx- Jones
Mike Ni wrote: (2) The query_string is really a product of the client. No. The query string is a part of the CGI hand-shake between systems. You can have a Query String between any systems which agree to CGI. CGI is an Interface, the fact that it is doomiant on HTTP doesnt change this... --

Re: QUERY_STRING

2004-03-24 Thread WC -Sx- Jones
James Edward Gray II wrote: The part we don't understand is why you keep asking this Perl mailing list a question that doesn't have anything to do with Perl. ;) Especially since this is so well documented - it is almost why the Internet (WWW) exists today. First hit right off Google: http://www.w

Re: QUERY_STRING

2004-03-24 Thread Mike Ni
> > part you don't unstand. > > The part we don't understand is why you keep asking > this Perl mailing > list a question that doesn't have anything to do > with Perl. ;) > > James Thanks for clearing up for me. However, so far I learnd 2 things: (1) Instead of parsing the string, I can u

Re: QUERY_STRING

2004-03-24 Thread James Edward Gray II
On Mar 24, 2004, at 12:36 PM, Mike Ni wrote: The question I am asking you, specifically is "how the query_string is constructed". Is this clear to you? Let me know spcifically which part you don't unstand. The part we don't understand is why you keep asking this Perl mailing list a question that

RE: QUERY_STRING

2004-03-24 Thread Mike Ni
f > To sum it up: > > a) Try to find the information yourself, Google is a > great tool and has the > added benefit that you won't have to wait for an > answer from the list... > b) Ask specific questions about what you don't > understand on the > _appropriate_ mailing list. > Please let me

FW: Process control from LAN master computer

2004-03-24 Thread Peterson, Darren - Contractor.Westar
>> On Mar 23, 2004, at 7:44 AM, Peterson, Darren - Contractor.Westar wrote: >> >> I've got a few Linux boxes on a LAN. I need to develop a gui app to >> start >> processes on any machine from a master pc. What process is to be >> started >> and when will be specifed by the user through the gui.

Re: Fuzzy string matching

2004-03-24 Thread Damon Allen DAVISON
On Wed, Mar 24, 2004 at 11:31:15AM +0100, juman wrote: > String 1 compared to String 2 gives 40% (four words are the same) > String 2 compared to String 1 gives 80% (four word are the same) You can find a summary of possibilities here: http://www.perlmonks.org/index.pl?node_id=162038 Basically,

Re: Fuzzy string matching

2004-03-24 Thread juman
Great... got it! :) Now my little script is running... Thanks for the help (again)... /juman On Wed, Mar 24, 2004 at 09:34:58AM -0600, James Edward Gray II wrote: > On Mar 24, 2004, at 4:31 AM, juman wrote: > > >I have two strings I want to compare doing some kind of fuzzy matching? > >Is there

Re: Fuzzy string matching

2004-03-24 Thread James Edward Gray II
On Mar 24, 2004, at 4:31 AM, juman wrote: I have two strings I want to compare doing some kind of fuzzy matching? Is there some good way to that in perl or could someone help with a routine matching word by word and giving a percental result. Like String 1 : This is a ten characters long string i

Re: Confused

2004-03-24 Thread WC -Sx- Jones
James Edward Gray II wrote: On Mar 24, 2004, at 7:59 AM, WC -Sx- Jones wrote: while() { chomp; s/^\s+//; s/\s+$//; next unless length; There's probably not much reason to chomp() and s/\s+$//, since the later handles both. Yes, and I forget that the way I used it chomp only gets ONE \n --

RE: $dbh->do('\@proc')

2004-03-24 Thread Jayakumar Rajagopal
Thanks Joseph. I will try opening .sql file, and iterate through every stmt. in it. regards, Jay -Original Message- From: R. Joseph Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 2:25 AM To: Jayakumar Rajagopal Cc: [EMAIL PROTECTED] Subject: Re: $dbh->do('[EMAIL PROTECTED

Re: bug in XML::Simple ?

2004-03-24 Thread Wiggins d Anconia
> > I did this shell command > > perl -e 'use XML::Simple qw(:strict); use Data::Dumper; print > Dumper(XMLin("<_a>b", 'ForceArray' => 1, KeyAttr => []))' > > delete.txt > > And the output was > > $VAR1 = { > '__a' => [ > 'b' >] > }; >

Re: Confused

2004-03-24 Thread James Edward Gray II
On Mar 24, 2004, at 7:59 AM, WC -Sx- Jones wrote: while() { chomp; s/^\s+//; s/\s+$//; next unless length; There's probably not much reason to chomp() and s/\s+$//, since the later handles both. James -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

Re: Confused

2004-03-24 Thread John W . Krahn
On Wednesday 24 March 2004 06:07, John W. Krahn wrote: > On Tuesday 23 March 2004 13:13, mike wrote: > > I am trying to get rid of a blank line at the start of a text file, > > and I dont understand why this does not work > > > > open(UPD1,"tem");# this file exists > > You should *ALWAYS* verify th

Re: LWP::Simple problem: CGI related?

2004-03-24 Thread WC -Sx- Jones
Jack Chen wrote: When I ran the above scrip on commandline, it worked. But when I ran it from a browser, it failed and I found a message in the log file saying that $content is undef. Wrong group -- there is a Perl Beginner CGI list too :) But, in the interest of completeness: #! /usr/bin/p

Re: Confused

2004-03-24 Thread John W . Krahn
On Tuesday 23 March 2004 13:13, mike wrote: > > I am trying to get rid of a blank line at the start of a text file, > and I dont understand why this does not work > > open(UPD1,"tem");# this file exists You should *ALWAYS* verify that the file opened successfully. open UPD1, 'tem' or die "Cannot

Re: Why is path to perl not included in modules?

2004-03-24 Thread WC -Sx- Jones
Jenda Krynicky wrote: No. It implies that modules are not supposed to be run directly. What do you expect perl /usr/lib/perl/lib/CGI.pm to do? AND - If Perl Modules ARE run directly then they *should* only provide self-test method -- which continue to expose what such modules do. But mainly Per

Re: Confused

2004-03-24 Thread WC -Sx- Jones
mike wrote: I am trying to get rid of a blank line at the start of a text file, and I dont understand why this does not work open(UPD1,"tem");# this file exists my @update1=; foreach $update1(@update1){ $update1=~s/^(\n)//; while() { chomp; s/^\s+//; s/\s+$//; next unless length; $update1

RE: QUERY_STRING

2004-03-24 Thread Bob Showalter
Mike Ni wrote: > Is there any place we can look up the definition > of these such as "CONTENT_LENGTH" & query_string. For the environment variables: http://hoohoo.ncsa.uiuc.edu/cgi/env.html For the HTTP headers that these variables are derived from: http://www.w3.org/Protocols/rfc2616/rfc

RE: QUERY_STRING

2004-03-24 Thread Guay Jean-Sébastien
Hello Mike, > Do we know where I can get a clear definition > of "query_string"? [and in another message...] > Is there any place we can look up the definition > of these such as "CONTENT_LENGTH" & query_string. I'm not sure why you're asking here for something like that. You can use Google t

bug in XML::Simple ?

2004-03-24 Thread Marcos . Rebelo
I did this shell command perl -e 'use XML::Simple qw(:strict); use Data::Dumper; print Dumper(XMLin("<_a>b", 'ForceArray' => 1, KeyAttr => []))' > delete.txt And the output was $VAR1 = { '__a' => [ 'b' ] }; I was aspecting $VAR1 = {

RE: use lib

2004-03-24 Thread Bob Showalter
B. Fongo wrote: > Is it recommendable to use the pragma "use lib " when installing a > program on a server shared by many users? > Assuming my IPS did not install certain CPAN modules which my needs, > and I decide to install them in my www directory. > In such a scenario, putting "use lib" on my s

Re: Why is path to perl not included in modules?

2004-03-24 Thread Jenda Krynicky
From: "Babale Fongo" <[EMAIL PROTECTED]> > I've realised that, most perl modules do not have #!/usr/bin/perl > written on the first line. Does it implies - that modules don't need > the perl interpreter to function? No. It implies that modules are not supposed to be run directly. What do you expe

Re: Test::Harness weird failure

2004-03-24 Thread Claude
> "Claude" == Claude <[EMAIL PROTECTED]> writes: > "Paul" == Paul Johnson <[EMAIL PROTECTED]> writes: Paul> Claude said: >>> Hello, >>> >>> I tried to create a test suite file containing the following code: [...] Paul> use Test::More tests => 1; Claude> Why would I need this separated

LWP::Simple problem: CGI related?

2004-03-24 Thread Jack Chen
Hi, I just found that a script I wrote before stopped working. The problem is that the 'get' method returns an undef. So I wrote a test script like: #!/usr/bin/perl -w use strict; use LWP::Simple; use CGI qw(:standard); my $content = get qw(http://yahoo.com); print $content; When I ran the ab

Why is path to perl not included in modules?

2004-03-24 Thread Babale Fongo
I've realised that, most perl modules do not have #!/usr/bin/perl written on the first line. Does it implies - that modules don't need the perl interpreter to function? Thanks

Confused

2004-03-24 Thread mike
I am trying to get rid of a blank line at the start of a text file, and I dont understand why this does not work open(UPD1,"tem");# this file exists my @update1=; foreach $update1(@update1){ $update1=~s/^(\n)//; $update1=~chomp; my @update2=split /#/,$update1;# this bit works But I still get a b

Re: help with arrays

2004-03-24 Thread Randy W. Sims
Florida Estrella wrote: The following is the incoming SOAP message (pay attention to the metadata tag which is an array of strings) http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> http://schem

Fuzzy string matching

2004-03-24 Thread juman
I have two strings I want to compare doing some kind of fuzzy matching? Is there some good way to that in perl or could someone help with a routine matching word by word and giving a percental result. Like String 1 : This is a ten characters long string is it not String 2 : This is not so long S

Antwort: Search for a file pattern in a directory tree recursively / Stoting Info on hash's

2004-03-24 Thread Manfred . Beilfuss
Hey Rajesh, being a beginner in perl fooling around similar problems like you, I just have the idea that you might solve the problem by using a hash to store the information about the file's you have already found . I've used ($FN,$PATH,$EXT) = fileparse ($File::Find::name,'\..*') ; to separate t

help with arrays

2004-03-24 Thread Florida Estrella
The following is the incoming SOAP message (pay attention to the metadata tag which is an array of strings) http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> http://schemas.xmlsoap.org/soap/enco