Re: I am a real begginer to perl......

2001-08-20 Thread Jos I. Boumans
LS, I should have this under 'paste' by now, seeing this apparently needs repeating every so often. DO NOT READ ENTIRE FILES INTO ARRAYS UNLESS THERE IS NO OTHER OPTION. are you realising you are slurping an entire file into memory? ever tried that with an apache log file? In this case, slur

RE: I am a real begginer to perl......

2001-08-17 Thread Smith, Jim R
Go buy Randal Schwartz's excellent book : Learning Perl (The llama book). It is the best learning text I've ever used. Regards, Jim -Original Message- From: Walnut [mailto:[EMAIL PROTECTED]] Sent: Friday, August 17, 2001 11:09 AM To: [EMAIL PROTECTED] Subject: Re: I am a real b

Re: I am a real begginer to perl......

2001-08-17 Thread Walnut
#open and read open(FILE, "<$filename"); @alllinesinthefile = <>; close(FILE); #open and write. Append uses >> open(FILE, ">$filename"); print FILE @alllinesinthefile; close(FILE); #looping foreach $line ( @alllinesinthefile ) { #Do whatever you want # Go away and study regular expr

RE: I am a real begginer to perl......

2001-05-03 Thread King, Jason
Casey West wrote .. >On Wed, May 02, 2001 at 11:44:20PM -0700, David Monarres wrote: >: I am alos fairly new with perl and completely new with perl one >: liners. I see how you can use regex's on the cmd line to edit a file >: (sort of sed ish). I tried this >: >: $ perl -pe 's/hello/reverse($1)

Re: I am a real begginer to perl......

2001-05-03 Thread Casey West
On Wed, May 02, 2001 at 11:44:20PM -0700, David Monarres wrote: : I am alos fairly new with perl and completely new with perl one liners. I : see how you can use regex's on the cmd line to edit a file (sort of sed : ish). I tried this : : $ perl -pe 's/hello/reverse($1)/' -i test : : all it prin

RE: I am a real begginer to perl......

2001-05-02 Thread King, Jason
David Monarres writes .. >I am alos fairly new with perl and completely new with perl one liners. >I see how you can use regex's on the cmd line to edit a file (sort of >sed ish). I tried this > >$ perl -pe 's/hello/reverse($1)/' -i test > >all it print's is reverse. I was wondering if you knew

Re: I am a real begginer to perl......

2001-05-02 Thread David Monarres
I am alos fairly new with perl and completely new with perl one liners. I see how you can use regex's on the cmd line to edit a file (sort of sed ish). I tried this $ perl -pe 's/hello/reverse($1)/' -i test all it print's is reverse. I was wondering if you knew of a way to read in a word and rev

Re: I am a real begginer to perl......

2001-05-02 Thread Me
> "how do I tell perl to open a file for reading, do various > commands, and then output those changes to a new file"??? Perl has some great one-liner shortcuts for writing filters. First, -e lets you put perl on the command line: perl -e ' print "foo\n" ' Prints foo Second, -p conve

Re: I am a real begginer to perl......

2001-05-02 Thread Me
> beginner ... recommended books other than the camel ... Apparently, the original Camel had two chapters that beginners would love -- "Common Tasks in Perl" and "Real Perl Programs". Later Camels removed this sort of material. The essence of this material, greatly expanded and wonderfully edit

Oracle/CGI/Perl (was: RE: I am a real begginer to perl......)

2001-05-02 Thread Timothy Kimball
: I am also a beginner and wondering if there are any other recommended : books other than the camel book from O'Reilly. I have been asked to : display information from the Oracle Database on the web using Perl and : CGI. So far, I mostly know how to check for patterns. Gulp!! O'Reilly has al

RE: I am a real begginer to perl......

2001-05-02 Thread Paul
are lots I left out. Hell, just perldoc perl for a list! > Thanks for any input. > > Olivier > > >-Original Message- > >From:Paul [SMTP:[EMAIL PROTECTED]] > >Sent:Wednesday, May 02, 2001 2:05 PM > >To: n6tadam; [EMAIL PROTECTE

Re: I am a real begginer to perl......

2001-05-02 Thread M.W. Koskamp
ROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 02, 2001 8:04 PM Subject: RE: I am a real begginer to perl.. > I am also a beginner and wondering if there are any other recommended > books other than the camel book from O'Reilly. I have been asked to > display infor

RE: I am a real begginer to perl......

2001-05-02 Thread ODoisnea
input. Olivier >-Original Message- >From: Paul [SMTP:[EMAIL PROTECTED]] >Sent: Wednesday, May 02, 2001 2:05 PM >To:n6tadam; [EMAIL PROTECTED] >Subject: Re: I am a real begginer to perl.. > > >--- n6tadam <[EMAIL PROTECTED]> wrote: >> Dear A

Re: I am a real begginer to perl......

2001-05-02 Thread Paul
--- n6tadam <[EMAIL PROTECTED]> wrote: > Dear All, > > I wonder if someone could help me. I have been programming in bash > for years > now, but I have decided that I would like to use perl. > > My question is: "how do I tell perl to open a file for reading, do > various commands, and then outp

Re: I am a real begginer to perl......

2001-05-02 Thread M.W. Koskamp
Read the documentation in IO::Handle and FileHandle - Original Message - From: n6tadam <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 02, 2001 1:27 PM Subject: I am a real begginer to perl.. > Dear All, > > I wonder if someone could help me. I have been programming

Re: I am a real begginer to perl......

2001-05-02 Thread Greg Meckes
#open file for reading open (READ, "file2.txt"); # you'll then have to loop through # the READ file with a foreach loop # or a while loop to perform # "various commands" while () { #perform command # Then write to the file print WRITE "$value\n"; } close(READ); close(WRITE); Greg