RE: Backing up two days from localtime

2002-04-25 Thread Timothy Johnson
Actually this is a really common question. The thing you need to remember is that when you use localtime(), what you are really saying is localtime(time). Local time takes the number of seconds since the year 1970 and translates it into the array you are using UNLESS YOU SPECIFY ANOTHER DATE I

Re: Backing up two days from localtime

2002-04-25 Thread Jeff 'japhy' Pinyan
On Apr 26, Tara Calishain said: >I need to back up two days from localtime and I can't figure out how to do >it. Currently I'm doing this just so I can work out the rest of the program: > >($day, $month, $year) = (localtime) [3,4,5]; #getting your local time The generic (read: potentially unsaf

Backing up two days from localtime

2002-04-25 Thread Tara Calishain
Howdy, I need to back up two days from localtime and I can't figure out how to do it. Currently I'm doing this just so I can work out the rest of the program: ($day, $month, $year) = (localtime) [3,4,5]; #getting your local time information $realday = $day-2; if ($realday<1) {$realday = 30} els

Re: Net::SFTP installation on Windows

2002-04-25 Thread Ahmed Moustafa
Ahmed Moustafa wrote: > How can I install Net::SSH and Net::SFTP on ActivePerl (Windows NT), please? Has anyone had Net:SFTP working on Windows? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: mod_perl

2002-04-25 Thread Wayne Dyck
Robert: > To make matters worse, rpm -q perl tells me I'm running perl-5.6.0-12, > quite a wais from the claim of 5.006. From the command line perl -v > gives me, "This is perl, v5.6.0 built for i386-linux" Did you by any chance install perl-5.6.0 from CPAN? I have had something like this happe

Re: http headers

2002-04-25 Thread Conan Chai
hi again, i was actually looking for modules that split the following into name/value pairs. the following is a typical request header from a web browser(eg.IE/netscape). more details on what i'm doing: i'm doing a simple proxy server. the web browser sends the request, the server uses sysread()

Re: OpenInteract and others

2002-04-25 Thread Ahmed Moustafa
There is Open Architecture Community System (OpenACS) . It is a well engineered Tcl/AOLServer-based framework. It uses PostgreSQL or Oracle. I think they made it to work with Apache. I don't know about mod_perl but there are a lot of discussions about Perl there at htt

mod_perl

2002-04-25 Thread Beau
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am following instructions found at http://take23.org/intro/index.xml/3 on how to install mod perl with apache already installed. The instructions are % tar xzvf mod_perl-x.xx.tar.gz % cd mod_perl-x.xx % perl Makefile.PL \ USE_APXS=1 \ WI

Re: wipe out elements in an array

2002-04-25 Thread drieux
On Thursday, April 25, 2002, at 05:37 , Peter Scott wrote: > > Use splice() if you want to remove a known number of elements that are > all adjacent and start from a known offset. Otherwise, use grep: > > @myarray = grep { $_ != 3 && $_ != 5 } @myarray > > If you want to remove element

OpenInteract and others

2002-04-25 Thread David Ulevitch
Hello beginners, I hope this is the appropriate forum for this question. I have been looking for a pretty good base system for which to build a portal system. (messages, news, other content, weather) I want to write most or all of the modules myself but I figured an existing base plat

Re: wipe out elements in an array

2002-04-25 Thread drieux
On Thursday, April 25, 2002, at 04:58 , Bryan R Harris wrote: > My guess (this is just an example): > > @myarray = (1,2,3,4,5,6,7,8,9,10); > foreach (@myarray) { if ($_ == 3 || $_ == 5) { undef($_); } } what you want to look at is perldoc -f splice one way to hack a solution here woul

Re: wipe out elements in an array

2002-04-25 Thread Peter Scott
At 08:24 PM 4/25/02 -0400, Jeff 'japhy' Pinyan wrote: >On Apr 25, Bryan R Harris said: > > >I'd like to remove all elements in an array that meet a certain criteria > >without changing their order. I'm sure this gets done all the time, but > >I'm not sure how to do it... > >You want splice() inst

Re: wipe out elements in an array

2002-04-25 Thread bob ackerman
On Thursday, April 25, 2002, at 05:24 PM, Jeff 'japhy' Pinyan wrote: > On Apr 25, Bryan R Harris said: > >> I'd like to remove all elements in an array that meet a certain criteria >> without changing their order. I'm sure this gets done all the time, but >> I'm not sure how to do it... > > You

Re: wipe out elements in an array

2002-04-25 Thread Jeff 'japhy' Pinyan
On Apr 25, Bryan R Harris said: >I'd like to remove all elements in an array that meet a certain criteria >without changing their order. I'm sure this gets done all the time, but >I'm not sure how to do it... You want splice() instead. perldoc -f splice -- Jeff "japhy" Pinyan [EMAIL P

Re: Parsing a line - part 2

2002-04-25 Thread John W. Krahn
David Gray wrote: > > > How about: > > > > /(\S+)=(.+?)(?=\s+\S+=|\s+|\z)/g > > > > > > To catch trailing whitespace at the end of the line of data? > > Actually, I meant: > > /(\S+)=(.+?)(?=\s+\S+=|\s*\z)/g >^^^ Yeah, that will work. :-) J

GoryDetails on: error log message

2002-04-25 Thread drieux
On Thursday, April 25, 2002, at 04:16 , drieux wrote: >> [Thu Apr 25 23:48:59 2002] [error] (2)No such file or directory: exec of >> /web/cgi-bin/genestate/check_login.cgi failed >> [Thu Apr 25 23:48:59 2002] [error] [client 192.168.0.1] Premature end of >> script headers: /web/cgi-bin/genestate

wipe out elements in an array

2002-04-25 Thread Bryan R Harris
I have another question that Learning Perl doesn't seem to address: I'd like to remove all elements in an array that meet a certain criteria without changing their order. I'm sure this gets done all the time, but I'm not sure how to do it... Help? My guess (this is just an example): @myarray

Re: Improving the Quality of Our Beginners was Re: Write permissions and other rights

2002-04-25 Thread drieux
On Thursday, April 25, 2002, at 04:27 , Robert Beau Link wrote: > On Thursday 25 April 2002 08:45 am, Ron Goral wrote: >> I do agree that the mysteries of the *NIX OS should not be covered >> in a list like this, but... [..] > but aren't perl's roots are in unix system admin, isn't that what Mr.

Re: CPAN?

2002-04-25 Thread drieux
On Thursday, April 25, 2002, at 04:14 , Bryan R Harris wrote: > > Is File::Find a standard module? on my darwin box - where I have made only module change - it was standard as of 5.6.0 > (It is a module, right?) perldoc -m File::Find {perldoc is your friend! start wit

RE: CPAN?

2002-04-25 Thread Mark Anderson
>Is File::Find a standard module? (It is a module, right?) I don't know >anything really about modules except that they exist. Is this method >better than using opendir/readdir/closedir? > >And back to the original question, is CPAN good for questions like this? >What do people usually use it f

Re: error log message

2002-04-25 Thread Geoffrey F. Green
On 4/25/02 6:56 PM, "Mat Harrison" <[EMAIL PROTECTED]> wrote: > what does this mean in my apache error log? i get it A LOT. someone said > that it was something to do with windows/linux line ending compatibility > probs. > > > > [Thu Apr 25 23:48:59 2002] [error] (2)No such file or directory:

Re: Improving the Quality of Our Beginners was Re: Write permissions and other rights

2002-04-25 Thread Beau
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 25 April 2002 08:45 am, Ron Goral wrote: > I do agree that the mysteries of the *NIX OS should not be covered > in a list like this, but... I'm still a blithering tyro where perl is concerned, but one of the most daunting aspects of my e

Re: error log message

2002-04-25 Thread drieux
On Thursday, April 25, 2002, at 03:56 , Mat Harrison wrote: > what does this mean in my apache error log? i get it A LOT. someone said > that it was something to do with windows/linux line ending compatibility > probs. > > > > [Thu Apr 25 23:48:59 2002] [error] (2)No such file or directory: exe

Re: CPAN?

2002-04-25 Thread Bryan R Harris
Is File::Find a standard module? (It is a module, right?) I don't know anything really about modules except that they exist. Is this method better than using opendir/readdir/closedir? And back to the original question, is CPAN good for questions like this? What do people usually use it for?

error log message

2002-04-25 Thread Mat Harrison
what does this mean in my apache error log? i get it A LOT. someone said that it was something to do with windows/linux line ending compatibility probs. [Thu Apr 25 23:48:59 2002] [error] (2)No such file or directory: exec of /web/cgi-bin/genestate/check_login.cgi failed [Thu Apr 25 23:48:59 20

RE: associative array not looking like I thought it would

2002-04-25 Thread Timothy Johnson
That's not the way associative arrays work. They are stored differently. If you want them to be printed in a certain order, then you must do it explicitly. I think it is really better to think of it as a hash instead of an associative array for that reason. Not all of the rules apply. I commo

associative array not looking like I thought it would

2002-04-25 Thread P. S. Starkey
I have some perl script (shown below) and I am wondering why the associative array being built ends up looking like the printout of the array as shown after the code. I would have assumed the array entries would have been shown in the same order they are put into the array but that is not happeni

RE: Debugging and 'uninitialized value in concatenation' question

2002-04-25 Thread Jenda Krynicky
From: "Jason Frisvold" <[EMAIL PROTECTED]> > Ok, shoot me now... I tried to provide an example and I blew it.. > *grin* I realize that the locals are block scope.. I know what I > meant, just didn't say it.. :) I see. You never know where does the other guy come from. In VB (yes I am forced

RE: Debugging and 'uninitialized value in concatenation' question

2002-04-25 Thread Jason Frisvold
Ok, shoot me now... I tried to provide an example and I blew it.. *grin* I realize that the locals are block scope.. I know what I meant, just didn't say it.. :) I understand that you cannot access a local variable outside it's scope.. Hrm.. ok, try this : sub dummy { my $a;

Re: Pinging

2002-04-25 Thread Adam Morton
You can't 'ping a specific port' ping is an IP tool, and ports do not show up until the TCP/UDP level of your seven layer dip. Do some research on ICMP for more info. If you want to know if a service that uses a specific port is responding, you will have to make some valid request using whatever

Pinging

2002-04-25 Thread Najamuddin, Junaid
I need some help I wrote a perl script which runs on win NT and pings the other server to ensure its availability in the network In case if ping fails it responds with email and page If I need to ping a specific port on that server, how I can accomplish that I can check that port thru a url in the

Re: Debugging and 'uninitialized value in concatenation' question

2002-04-25 Thread Jenda Krynicky
From: "Jason Frisvold" <[EMAIL PROTECTED]> > Judging from the subject lines coming across the list today, I think > I'm gonna toss this question out there and then duck and cover... :-) We do not shoot at people here. Even if they do provide the missile address. ;-) > Question #1. > > When I

Re: Debugging and 'uninitialized value in concatenation' question

2002-04-25 Thread Felix Geerinckx
on Thu, 25 Apr 2002 18:49:16 GMT, Jason Frisvold wrote: > Question #1. > [...] > One major side effect > of this is that my code will begin to run slower due to all of the > debugging... See Sean M. Burke's "Constants in Perl" article in The Perl Journal, which is available online. Especially t

Re: authentication and user management

2002-04-25 Thread bob ackerman
On Thursday, April 25, 2002, at 12:15 PM, Mat Harrison wrote: > also, what is the best way to include the cookie-checker in the restricted > pages, ExecCGI or IncludeVirtual? i use CGI::Cookie in a package of my subroutines. I put 'use utils;' and call the checking subroutine at start of each

Thanks - Re: multiple greps in if()

2002-04-25 Thread Steven_Massey
Excellent thanks felix and michael. Felix Geerinckx <[EMAIL PROTECTED]> on 04/25/2002 02:12:17 PM To: [EMAIL PROTECTED] cc: Subject: Re: multiple greps in if() on Thu, 25 Apr 2002 12:54:53 GMT, [EMAIL PROTECTED] (Steven Massey) wrote: > ideally I would like multiple grep pairs ie.. >

Re: authentication and user management

2002-04-25 Thread bob ackerman
On Thursday, April 25, 2002, at 11:57 AM, Mat Harrison wrote: > what about some clever person (such as the people on this list) faking the > cookie? now, you are talking about the general issue of authorization. a fake cookie would have to know a valid user id. this might not to be too diffic

Re: Net::SNMP module example failing

2002-04-25 Thread Ted Hajduk
Tim, Thanks for replying. The error occurred after I did the same thing you did. I found out I'm running the 3.6 version of the module. I trying to get the 4.0.1 via CPAN. I'll let you know what happens. Thanks again Ted --- Tim Musson <[EMAIL PROTECTED]> wrote: > Hey Ted, > > My MUA beli

Debugging and 'uninitialized value in concatenation' question

2002-04-25 Thread Jason Frisvold
Judging from the subject lines coming across the list today, I think I'm gonna toss this question out there and then duck and cover... :-) I have 2 actual questions. I'll try to be as specific as possible.. :-) Question #1. When I'm writing code, I want to be able to view as much output as po

Re: setruid?

2002-04-25 Thread Jonathan E. Paton
> I am very new to Perl and to computer programming in general, but > have been amazed at all the cool stuff that it can do. Recently I've been > working on a program to run loops of S-plus scripts. I can get the program > to run 1 s-plus batch script but when it attempts to run multiple s

RE: Unix to dos; dos to unix...

2002-04-25 Thread Collins, Joe (EDSI\\BDR)
In emacs: Esc-% C-q C-j C-q C-m C-q C-j ! Where is either ENTER or RETURN. I just wanted to help also Joe -Original Message- From: David vd Geer Inhuur tbv IPlib [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 11:03 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject:

Re: authentication and user management

2002-04-25 Thread bob ackerman
On Thursday, April 25, 2002, at 10:58 AM, Mat Harrison wrote: > i am building a perl/cookie members system for my site using SSI to check > if > a cookie is present (set at login), if not, to redirect to an error page. > This is my plan: > > > 1. login page. check that the username and passwor

Re: CPAN?

2002-04-25 Thread Shawn
On 04/25, drieux said something like: > > On Thursday, April 25, 2002, at 10:41 , Bryan R Harris wrote: > > you heard right: > >I heard that you could find code for almost anything at CPAN. How do you > >go about this? > what you need to sort out is how to write the 'callback' function >

Re: CPAN?

2002-04-25 Thread drieux
On Thursday, April 25, 2002, at 10:41 , Bryan R Harris wrote: you heard right: > I heard that you could find code for almost anything at CPAN. How do you > go about this? http://www.cpan.org but I have the search book marked: http://search.cpan.org/ where I rummage around for known

setruid?

2002-04-25 Thread Pearson, Andrew S
Hello everyone, I am very new to Perl and to computer programming in general, but have been amazed at all the cool stuff that it can do. Recently I've been working on a program to run loops of S-plus scripts. I can get the program to run 1 s-plus batch script but when it attempts to run

RE: CPAN?

2002-04-25 Thread Wagner-David
You should be able to use the standard perl to accomplish this task. Look for File::Find with in your doc and this should be a starting place for you. If you want you can go to CPAN and there are a number of different ways to search and go from there. Wags ;) -Original Me

CPAN?

2002-04-25 Thread Bryan R Harris
This is the beginners list, right? I heard that you could find code for almost anything at CPAN. How do you go about this? For example, say I want to recurse through a directory and all subdirectories creating an index text file in each directory containing a list of the text files in that dir

authentication and user management

2002-04-25 Thread Mat Harrison
i am building a perl/cookie members system for my site using SSI to check if a cookie is present (set at login), if not, to redirect to an error page. This is my plan: 1. login page. check that the username and password match that in the database. 2. if yes then set a cookie with the users's ID

Fwd: problems with split

2002-04-25 Thread drieux
I think Stefan provided an Elegant query - since he had a good sample of data, and a specific test case of code for use to look at. >> while ($line = ) { >> ($nodeid, $nameid, $type, $longitude, $latitude, $altitude) = split >> ("|", $line); that regular expression interpolates to /''

RE: About Asking Stupid Questions Myself Included.

2002-04-25 Thread Ron Powell
Now, I'm nervous about posting my (typically stupid) questions to the list! :) Ron Crud. Now I have to be equally nervous about posting replies that really have no value. -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 12:44 PM To

Re: Improving the Quality of Our Beginners was Re: Write permissions and other rights

2002-04-25 Thread Michael Lamertz
On Thu, Apr 25, 2002 at 10:45:31AM -0500, Ron Goral wrote: > Sorry Michael. I was not clear there. I was not saying that *you* flamed > *me*. That did not happen. I was speaking in a general sense to the > flamers on this board. Please accept my apology for creating this > misconception. No,

About Asking Stupid Questions Myself Included.

2002-04-25 Thread Jackson, Harry
Although this made me laugh it has some relevance to how questions should/shouldn't be asked. http://perl.plover.com/Questions.html Harry * COLT Telecommunications Registered in England No. 2452736 Registered O

starting a java bytecode off a server via html code

2002-04-25 Thread William.Ampeh
Hello, Is there a way one could startup a server-side Java applet without logging into the server?. So say I have a Java bytecode sitting at: "http://www.rsma.frb.gov/fof/cgi-bin/JAVA/DigitalClock.class"; How do I start this via an html file? Here is my html code which does not work -

RE: Improving the Quality of Our Beginners was Re: Write permissions and other rights

2002-04-25 Thread Ron Goral
Sorry Michael. I was not clear there. I was not saying that *you* flamed *me*. That did not happen. I was speaking in a general sense to the flamers on this board. Please accept my apology for creating this misconception. As for Unix file permissions, have a look at the cover of "Learning Pe

Re: How to find module dependencies

2002-04-25 Thread Michael Lamertz
On Thu, Apr 25, 2002 at 09:36:16AM -0500, Elaine -HFB- Ashton wrote: > Michael Lamertz [[EMAIL PROTECTED]] quoth: > *> > *>PS: I've made the mistake to install quite a handful of modules via > *>Debian packages instead of CPAN and they are *NOT* installed in > *>'site_perl' but somewhere in '/usr/

Re: Unix to dos; dos to unix...

2002-04-25 Thread David vd Geer Inhuur tbv IPlib
Hi There, Just a small addition on the remarks : I don't know if you realy want this to automate, but "vi" can do it as well. Just type : :1,$s/[Ctrl + v] [Ctrl + m]//g The [Ctrl + v] makes you able to type in an escape character. Most of all the [Ctrl + m] (^M) is bothering you. :) I know,

Re: Unix to dos; dos to unix...

2002-04-25 Thread Gary Stainburn
On Thursday 25 April 2002 3:08 pm, Ron Powell wrote: > There is a utility out there that will convert unix-style end-of-lines (LF) > to dos-style (CR/LF)... > > Just for giggles, I'm trying to write a perl script to do this... > > Here's what I've tried... > > while () { > $line = $_; >

Re: Help! Path to Perl?

2002-04-25 Thread Elaine -HFB- Ashton
FLA [[EMAIL PROTECTED]] quoth: *>This is about as "beginner" as a person can possibly be... *> *>I installed MacPerl on my iMac yesterday (Classic environment) so that I *>could learn to use Woda, a web-oriented database package, which I had tried *>(and failed) to get running remotely on the serv

Re: How to find module dependencies

2002-04-25 Thread Elaine -HFB- Ashton
Michael Lamertz [[EMAIL PROTECTED]] quoth: *> *>PS: I've made the mistake to install quite a handful of modules via *>Debian packages instead of CPAN and they are *NOT* installed in *>'site_perl' but somewhere in '/usr/local/share' and are also *NOT* *>registered in perllocal. That's *NOT* funny,

RE: Advice and suggestions needed for difftree script

2002-04-25 Thread Nikola Janceski
Oops... > if $dev1 != $dev2 and $inode1 != $inode2 should be: if not $dev1 == $dev2 && $inode1 == $inode2 > -Original Message- > From: Nikola Janceski [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 10:33 AM > To: Beginners (E-mail) > Subject: Advice and suggesti

Re: How to find module dependencies

2002-04-25 Thread Elaine -HFB- Ashton
sharan [[EMAIL PROTECTED]] quoth: *> *>How to find the module dependencies? I have used many modules in my tool *>development, and i given all the modules used with my tool package. But when *>the tool is installed on Windows at the customer places they are getting *>problems as some of the modul

Advice and suggestions needed for difftree script

2002-04-25 Thread Nikola Janceski
***Okay this is the situation: I have a main directory "tree" which has similar directories "branch" from the trunk but links back to other branches or the main tree. I want to know what files are different between two branches or a branch and the tree. ***What I have so far: I have written a

Re: web automation - where to read?

2002-04-25 Thread Elaine -HFB- Ashton
Martin A. Hansen [[EMAIL PROTECTED]] quoth: *>hi *> *>im trying to write a scipt that crawls a website. however, with only the documentation from the perl cookbook and some no_good manpages from the LWP modules, im stuck! *> *>where can i find som documentation (pref. online) ? *> *>or even some

Re: web automation - where to read?

2002-04-25 Thread Martin A. Hansen
On Thu, Apr 25, 2002 at 01:57:07PM -, Felix Geerinckx wrote: > > im trying to write a scipt that crawls a website. however, with > > only the documentation from the perl cookbook and some no_good > > manpages from the LWP modules, im stuck! > > Would you care to explain what is 'no_good' abo

Re: Unix to dos; dos to unix...

2002-04-25 Thread Felix Geerinckx
on Thu, 25 Apr 2002 14:08:12 GMT, [EMAIL PROTECTED] (Ron Powell) wrote: > The same input file, when converted using the unix utility > unix2dos, converts "properly." This leads me to believe that I'm > missing something obvious here You need 'binmode': perldoc -f binmode > I'm

Re: Unix to dos; dos to unix...

2002-04-25 Thread Ahmed Moustafa
Ron Powell wrote: > There is a utility out there that will convert unix-style end-of-lines (LF) > to dos-style (CR/LF)... > > Just for giggles, I'm trying to write a perl script to do this... > > Here's what I've tried... > > while () { > $line = $_; > $line=~tr/\012/\015\012/; >

Re: Unix to dos; dos to unix...

2002-04-25 Thread Tirthankar C. Patnaik
hi Ron, another unix command is flip. i've written a small perl script that converts a dos file to a unix one. as you can see, i've just substituted the \r\n with a \n. the reverse can easily be done. this is a working example. it's not fast, but workable. i'd welcome a

Re: help about perl -pi -e

2002-04-25 Thread Alain
On Thursday 25 April 2002 15:41, you wrote: | Hi, | | Am Donnerstag, 25. April 2002 15:20 hast Du geschrieben: | > exact, that's it. | > but i've got the solution to that problem (i forgot to put the trailing | > 's' in my post, but i used it and it did not work) | > the solution is: | > perl -p0i

RE: Unix to dos; dos to unix...

2002-04-25 Thread Bob Showalter
> -Original Message- > From: Ron Powell [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 10:08 AM > To: '[EMAIL PROTECTED]' > Subject: Unix to dos; dos to unix... > > > There is a utility out there that will convert unix-style > end-of-lines (LF) > to dos-style (CR/LF)... >

RE: Unix to dos; dos to unix...

2002-04-25 Thread Nikola Janceski
unix2dos and dos2unix is what you are looking for. I tried with perl also and was unsucessful also for same reason. > -Original Message- > From: Ron Powell [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 10:08 AM > To: '[EMAIL PROTECTED]' > Subject: Unix to dos; dos to unix..

RE: Parsing a line - part 2

2002-04-25 Thread David Gray
> How about: > > /(\S+)=(.+?)(?=\s+\S+=|\s+|\z)/g > > > To catch trailing whitespace at the end of the line of data? Actually, I meant: /(\S+)=(.+?)(?=\s+\S+=|\s*\z)/g ^^^ -dave -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Unix to dos; dos to unix...

2002-04-25 Thread Ron Powell
There is a utility out there that will convert unix-style end-of-lines (LF) to dos-style (CR/LF)... Just for giggles, I'm trying to write a perl script to do this... Here's what I've tried... while () { $line = $_; $line=~tr/\012/\015\012/; print OUTFILE ("$line\n");

Re: help about perl -pi -e

2002-04-25 Thread Alain
On Thursday 25 April 2002 15:52, Bob Showalter wrote: | > -Original Message- | > From: Bob Showalter [mailto:[EMAIL PROTECTED]] | > Sent: Thursday, April 25, 2002 9:46 AM | > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] | > Subject: RE: help about perl -pi -e | > | > ... | > | > Do you want

Re: web automation - where to read?

2002-04-25 Thread Felix Geerinckx
> im trying to write a scipt that crawls a website. however, with > only the documentation from the perl cookbook and some no_good > manpages from the LWP modules, im stuck! Would you care to explain what is 'no_good' about the LWP manpages? > where can i find som documentation (pref. online) ?

RE: help about perl -pi -e

2002-04-25 Thread Bob Showalter
> -Original Message- > From: Bob Showalter [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 9:46 AM > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] > Subject: RE: help about perl -pi -e > > ... > > Do you want to delete all the lines in each file > that follow "sub html_base[sS]"?

RE: help about perl -pi -e

2002-04-25 Thread Bob Showalter
> -Original Message- > From: Alain [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 4:25 AM > To: [EMAIL PROTECTED] > Subject: help about perl -pi -e > > > Hello all, > > I've the following problem: > I need to erase about 150 lines (always the same lines) at > the end of a

RE: Parsing a line - part 2

2002-04-25 Thread David Gray
> > > @keys{ qw/P ST U SL D/ } = \( $Proc, $Start, $Url, > $Sleep, $Drive ); > > > > This is a shortcut for defining the values of a hash -- it creates > > $keys{P} == $Proc, $keys{ST} == $Start, etc. > > $keys{P} = \$Proc, $keys{ST} = \$Start, etc. Okay... Fair enough. Maybe I'm missing some

Re: multiple greps in if()

2002-04-25 Thread Michael Lamertz
On Thu, Apr 25, 2002 at 01:54:53PM +0100, [EMAIL PROTECTED] wrote: > Hi > > anyone have any ideas on how example 2 or 3 below should correctly be > written ??? Actually your code can be interpreted in different ways. I guess you'll need the following: -- perldoc -f grep --

web automation - where to read?

2002-04-25 Thread Martin A. Hansen
hi im trying to write a scipt that crawls a website. however, with only the documentation from the perl cookbook and some no_good manpages from the LWP modules, im stuck! where can i find som documentation (pref. online) ? or even some examples ? regards martin -- To unsubscribe, e-mail:

Solved: sort regex trouble!

2002-04-25 Thread Martin A. Hansen
hi i finally got it to work. it was very simple ... _if_ you remember that its not but you are trying to match! martin On Wed, Apr 24, 2002 at 11:04:42AM -0400, David Gray wrote: > > >May I suggest: > > >(my $A = $a) =~ s/^(\d+)<\/td>/$1/; > > >(my $B = $b) =~ s/^(\d+)<\/td>/$1/; > > > >

Re: help about perl -pi -e

2002-04-25 Thread Matthew Weier O'Phinney
I'm not quite sure what you're trying to do with this... but from what you've provided, the regular expression you wrote will only remove text matching "sub html_base" on a single line -- and not even the newline at the end. The '-pi' switches will grab a single line at a time from the cur

Re: multiple greps in if()

2002-04-25 Thread Felix Geerinckx
on Thu, 25 Apr 2002 12:54:53 GMT, [EMAIL PROTECTED] (Steven Massey) wrote: > ideally I would like multiple grep pairs ie.. > if(grep /(Handicap && Help) || (Friend && Foe)/, $source) { > this does not work > } Put the '&&' outside of the pattern: #! perl -w use strict; my @strings

Re: help about perl -pi -e

2002-04-25 Thread Michael Lamertz
On Thu, Apr 25, 2002 at 05:02:10AM -0700, John W. Krahn wrote: > Michael Lamertz wrote: > > > > A. > > perl -p0i -e 's/sub html_base.*//s' *.cgi > > > > reads the whole file in one > > > (-0 means $/ = \000), > > \000 is a reference to a numeric literal, "\000" is the null character > whic

Re: problems with split

2002-04-25 Thread Michael Lamertz
On Thu, Apr 25, 2002 at 02:34:55PM +0200, [EMAIL PROTECTED] wrote: > hi, > > i have a data file test1.txt as follows: > > 551356835||1|7684940|47534900|0 > .. > > my code should open test1.txt, read in the data, convert it an print it into > test2.txt : > > ($nodeid, $nameid, $type

Re: problems with split

2002-04-25 Thread Sachin G. Balsekar
hi, try escaping the | split ("\|", $line); hope this works sgb. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 25, 2002 6:04 PM Subject: problems with split hi, i have a data file test1.txt as follows: 551356835||1|7684940|47534

multiple greps in if()

2002-04-25 Thread Steven_Massey
Hi anyone have any ideas on how example 2 or 3 below should correctly be written ??? Thanks for any help that can be given if(grep /Handicap|Help/, $source) { this seems to work } if(grep /(Handicap && Help)/, $source) { this does not work } ideally I would like multiple grep pairs ie.. if(gre

problems with split

2002-04-25 Thread Stefan.Haberer
hi, i have a data file test1.txt as follows: 551356835||1|7684940|47534900|0 551356835||1|7684940|47534900|0 551356835||1|7684940|47534900|0 551356835||1|7684940|47534900|0 551356835||1|7684940|47534900|0 551356835||1|7684940|47534900|0 551356835||1|7684940|47534900|0 551356835||1|7684940|475349

XS and Perl version

2002-04-25 Thread VINCENT BUFFERNE
I am using a XS wrapper with Perl 5.004. I am planning to go for Perl 5.6.1. Do I have to plan modifications within the XS code ? Thanks, Vincent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Net::SNMP module example failing

2002-04-25 Thread Tim Musson
Hey Ted, My MUA believes you used (X-Mailer not set) to write the following on Wednesday, April 24, 2002 at 9:56:09 PM. TH> Hello, TH> I'm executing the 1st example (get sysUpTime) in the TH> Net::SNMP module at TH> http://search.cpan.org/doc/DTOWN/Net-SNMP-4.0.1/lib/Net/SNMP.pm TH> The exampl

Re: help about perl -pi -e

2002-04-25 Thread John W. Krahn
Michael Lamertz wrote: > > A. > perl -p0i -e 's/sub html_base.*//s' *.cgi > > reads the whole file in one perldoc perlrun [snip] -0[digits] specifies the input record separator (`$/') as an octal number. If there are no digits, the null charĀ­ acter is the separator. Oth

RE: Setting a Variable to String with \n? --> Perl 6

2002-04-25 Thread Gary Hawkins
> This evidently is going to be addressed in Perl6 (with respect to > here-docs). > > cf. http://dev.perl.org/perl6/apocalypse/2 Pretty entertaining stuff. Something uncanny about it. Cool to watch a programming language being designed or influence it. "... we won't make the mistake of reintr

Re: FIFO handeling

2002-04-25 Thread Michael Lamertz
On Thu, Apr 25, 2002 at 10:04:38AM +0100, Rus Foster wrote: > Hi All, > I've got a small problem with a FIFO. Using the following code snippet > > #!/bin/perl simple but valid code snipped ... > > Now if I do something like "cat > /tmp/tp9100" and pass characters this > works. However whe

Re: help about perl -pi -e

2002-04-25 Thread Michael Lamertz
On Thu, Apr 25, 2002 at 10:25:18AM +0200, Alain wrote: > Hello all, > > I've the following problem: > I need to erase about 150 lines (always the same lines) at the end of a serie > of files. > What I have done in the shell is: > #perl -pi -e "s/sub html_base[\s\S]*//" *cgi 2 options: A. p

FIFO handeling

2002-04-25 Thread Rus Foster
Hi All, I've got a small problem with a FIFO. Using the following code snippet #!/bin/perl my $fifo="/tmp/tp9100"; open(IN,"$fifo") || die "Can not open $fifo"; while() { print $_; } Now if I do something like "cat > /tmp/tp9100" and pass characters this works. However when I send ^

help about perl -pi -e

2002-04-25 Thread Alain
Hello all, I've the following problem: I need to erase about 150 lines (always the same lines) at the end of a serie of files. What I have done in the shell is: #perl -pi -e "s/sub html_base[\s\S]*//" *cgi But this command only erase one line at once. And I want to erase all the lines in one ti