Re: get only filenames and not directory names under a specific path.

2006-07-27 Thread Alan_C
On Wednesday 26 July 2006 00:59, Rob Dixon wrote: > Hello Alan > > Alan_C wrote: > > On Tuesday 25 July 2006 15:56, Rob Dixon wrote: > >>Nishi Bhonsle wrote: [ snip ] > > [ snip ] [ snip ] > > #!/usr/bin/perl > >use strict; >

Re: get only filenames and not directory names under a specific path.

2006-07-25 Thread Alan_C
On Tuesday 25 July 2006 15:56, Rob Dixon wrote: > Nishi Bhonsle wrote: > > I got the last soln, ie to use File::Basename module. Please ignore the > > last thread. > > > > I am still interested to know why Rob's soln doesnt work for me? > > So was I, and it's because I made a mistake. Because t

Re: pattern matching

2006-07-17 Thread Alan_C
On Monday 17 July 2006 18:20, Timothy Johnson wrote: > \1 is the same thing as $1 inside of a regex, but it is generally > recommended that you don't use it. I thought it's ok to use it in a match or on the *left* side (but not on the right side) of a substitution >> then I'm stumped, what's the

Re: write out filenames of files existing on a filesystem into afile

2006-07-09 Thread Alan_C
[ . . ] Hi, my @new = grep /[^.]/, readdir DIR; (on Linux I tried it) that eliminates . and .. from the catch. *But the next code prints all 8 lines of data it does not eliminate . and .. from the catch, print* Isn't that a character class that says "not a dot" So, why the difference (readdi

Re: An array like line that I do not understand

2006-06-16 Thread Alan_C
On Friday 16 June 2006 09:02, you wrote: > On 6/16/06, Alan_C <[EMAIL PROTECTED]> wrote: > [snip] > > > 1 'build' slack build slackbuild sbuild pkg > > > > 2 'build' slack build slackbuild sbuild pkg > > > > 3 'build'

Re: An array like line that I do not understand

2006-06-16 Thread Alan_C
On Friday 16 June 2006 09:02, you wrote: > On 6/16/06, Alan_C <[EMAIL PROTECTED]> wrote: > [snip] > > > 1 'build'  slack build slackbuild sbuild pkg > > > > 2 'build'  slack build slackbuild sbuild pkg > > > > 3 'build'

An array like line that I do not understand

2006-06-15 Thread Alan_C
Hi, I've a flat file database of sorts. Each of the flat file has a keyword line as one of the first nine lines. A keyword line begins with: #: Here's a keyword line: #: building a linux kernel from source The enclosed Perl code uses a hash to store the name(s) of the particular flat file(s

Re: slurp from commandline?

2006-06-06 Thread Alan_C
On Tuesday 06 June 2006 01:13, John W. Krahn wrote: [ few example commands ] > > I'm accustomed to some of those. But how do I or is it possible to file > > slurp on the command line, substituting \n+ with \n > > It is explained in the perlrun document for the -0 (zero) switch. > > perldoc perlrun

slurp from commandline?

2006-06-06 Thread Alan_C
Hi, perl -pi.bak -e 'tr/\xA0/ /' filenames* # all files in a folder find . | xargs perl -p -i.bak -e 's/oldstring/newstring/g' perl -e 's/string/stringier/gi' -p -i.bak *.html I'm accustomed to some of those. But how do I or is it possible to file slurp on the command line, substituting \

Re: net::ftp with retry & Big brother notifications from applications

2006-05-14 Thread Alan_C
On Sunday 14 May 2006 04:45, Ken Foskey wrote: [ during xfer, the connection ocasionally breaks ] [ seeks to resume the xfer where left off ] > Secondly is there an easy way to send messages to Big Brother to go > orange, red then go green again? We are using a file and writing > messages and ther

Re: dbmopen versus tie

2006-05-06 Thread Alan_C
On Saturday 06 May 2006 02:19, Alan_C wrote: > Hi, > > [EMAIL PROTECTED]:~$ perldoc -f dbmopen > > dbmopen HASH,DBNAME,MASK >[This function has been largely superseded by the "tie" > function.] > > > But it does no

dbmopen versus tie

2006-05-06 Thread Alan_C
Hi, [EMAIL PROTECTED]:~$ perldoc -f dbmopen dbmopen HASH,DBNAME,MASK [This function has been largely superseded by the "tie" function.] But it does not say "completely superseded" Thus I seek a guide for when for me to use either of the two.

Re: How to use proxy with LWP?

2006-04-15 Thread Alan_C
Hi, (just now found at bottom) which redirects to: http://bfr.caseywest.com/ scroll down to heading entitled: April 14, 2006 How to use proxy with LWP? which has a dozen cross referenced searches going to lots of very relevant places. Please post your

Re: How to use proxy with LWP?

2006-04-15 Thread Alan_C
On Friday 14 April 2006 23:24, Alan_C wrote: > On Friday 14 April 2006 14:36, siegfried wrote: [ . . ] > > How do I modify the above fragment so I can conditionally use a proxy? http://www.google.com/search?q=perl+lwp+proxy&start=0&ie=utf-8&oe=utf-8&client=firefox-a&r

Re: How to use proxy with LWP?

2006-04-14 Thread Alan_C
On Friday 14 April 2006 14:36, siegfried wrote: > I stole the following code fragment from an example program: > > use vars '@ISA'; > @ISA = 'LWP::UserAgent'; > my $agent= __PACKAGE__->new; > > Now I want to use a proxy and a search on CPAN to find > http://search.cpan.org/~qjzhou/LWP-UserAgent

Re: Scraping Data Behind a Form

2006-04-12 Thread Alan_C
On Wednesday 12 April 2006 12:20, [EMAIL PROTECTED] wrote: [ . . ] lynx -source http://www.theblackchurchpage.com/modules.php?name=Locator > tsthtmsource.htm That gets it the page's markup/source on my Slackware. There's javascript in that page but I don't know much about this. It appears you

Re: ignore first 9 lines...

2006-04-12 Thread Alan_C
Hi, > Just to muddy the waters a little more (and hopefully answer a > question I've had for a while): how does the "flip-flop" operator > function here: > > while (<>) { > next if 1..9; > # the rest of the code > } Since I (used to) try to turn stuff into Rocket Science, I

Re: hash value and grep / get some files searched and indexed

2006-04-11 Thread Alan_C
Thanks to Mr. Krahn and Jaime Murilllo! Yeee Ha!!! (also, a couple more ques. about the code if I may, further below) I got the output that I want: [EMAIL PROTECTED]:~$ grepf6tst hash 1 'hash' array of hashes 2 'hash' initialize sort and print hash 3 'hash' ref deref hash array it

Re: hash value and grep / get some files searched and indexed

2006-04-10 Thread Alan_C
On Sunday 09 April 2006 19:34, John W. Krahn wrote: > Alan_C wrote: > > Hi. > [ . . ] > This may be close to what you want: Very nearly exactly. It's very fast and without a pre created index file as well. Likely is portable to other platform too. I admit mine a bit hunky

Re: hash value and grep / get some files searched and indexed

2006-04-09 Thread Alan_C
On Saturday 08 April 2006 01:08, Alan_C wrote: > On Friday 07 April 2006 03:34, John W. Krahn wrote: > > Alan_C wrote: > > > Hi, > > > > Hello, Hi. Thanks for the help. I've got a (Linux platform) working solution with the improvements that I mentioned are

Re: increment operator

2006-04-08 Thread Alan_C
On Saturday 08 April 2006 20:19, Chris Charley wrote: > - Original Message - > From: "Alan_C" <[EMAIL PROTECTED]> [ . . ] > > Hi, > > > > [EMAIL PROTECTED]:~$ this_pl_script word array print > > > > $size prints at 3 and it finds

increment operator

2006-04-08 Thread Alan_C
Hi, [EMAIL PROTECTED]:~$ this_pl_script word array print $size prints at 3 and it finds each of the 3 words entered on the command line. But the order of the printed out found words isn't what I expected -- I had expected the ouput order of 1st word, 2nd word, 3rd word as entered on the comma

Re: hash value and grep / get some files searched and indexed

2006-04-08 Thread Alan_C
On Friday 07 April 2006 03:34, John W. Krahn wrote: > Alan_C wrote: > > Hi, > Hello, [ snip ] > > my @keys = sort keys %data; I find learning how to write Perl a bit spacey -- and also, not unlike that of learning in the sport of skiing where "I fell down a lot when I w

hash value and grep / get some files searched and indexed

2006-04-07 Thread Alan_C
Hi, each file name begins with xtst of which I've near 18 of these small files (for example, xtst033006, xtst040106, xtst022406 etc. etc.) these text files may contain code snippet and/or help, howto info within the first 6 lines of each of these files there is a keyword line that begins with

Re: Howto Install a Perl Wrapper Module for a C Library in HomeDirectory

2006-03-24 Thread Alan_C
On Friday 24 March 2006 06:02, you wrote: [ . . ] > $ ./configure --prefix=~/tomypath Where did I miss seeing that configure can be used as a part of the installation of a Perl module? [ . . ] > Still, I got the same error report. > Can't get it working. from original post:   It returns: Note

Re: Howto Install a Perl Wrapper Module for a C Library in Home Directory

2006-03-24 Thread Alan_C
On Friday 24 March 2006 01:02, Wijaya Edward wrote: [ not found the C library ] http://search.cpan.org/~pmqs/DB_File-1.814/DB_File.pm I had DL that tar.gz then extracted it to disk. Then looked at its readme file. its readme said to edit the file named config.in and in that file tell it wher

Re: loop until empty string

2006-03-23 Thread Alan_C
On Thursday 23 March 2006 15:51, Christopher Spears wrote: [ exits after one round ] but . . > I want the program to keep asking the user for a > pattern until an empty string is entered. One way to do it: look for: <- added this -- there are 4 of them (4 newly added lines) wrapped the whole thi

xA0 ( decimal 160 ) in code fixed from email $_ =~ s/\xA0/ /g;

2006-03-22 Thread Alan_C
Short version: Copy/paste code from list emails brings undesired characters; I discovered a Perl fix for it. -- Detailed (and longer) version: Maybe my Kmail is doing it (I copy from Kmail and paste into editor). I tried two editors, Kate and Nedit so I don't think the editor is the cause. I

Re: Making Image::Magick against a specific ImageMagick installation path

2006-02-20 Thread Alan_C
On Monday 20 February 2006 11:47, JupiterHost.Net wrote: > [EMAIL PROTECTED] wrote: > > On Friday 17 February 2006 10:25, JupiterHost.Net wrote: > >>Howdy list, Hi. [ . . ] > The question is if I buile Image Magick (the system library part of it) > with --prefix, how do I tell the Image::magick in