AW: oops concepts

2007-09-13 Thread Angerstein
Perl OOP is simple. All you need is here http://perldoc.perl.org/perltoot.html And here http://perldoc.perl.org/perltooc.html Short intro: Bless blesses a Datacontainer (scalar array or hash) with the name of the package. Block{ bless @array; print [EMAIL PROTECTED]; } Prints out something l

autoload

2007-09-13 Thread lists user
Hello, Why we need AUTOLOAD and what's the usage of $AUTOLOAD? Can you show an example to help explain it?Thanks in advance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: oops concepts

2007-09-13 Thread usenet
On Sep 12, 11:33 pm, [EMAIL PROTECTED] (Perl Pra) wrote: > Hi Gurus, > > I am aware of perl, Now I need to code in perl using oops. Then you should also be aware of Perl docs. Start with: perldoc perltoot (or maybe skim "perldoc perlobj" first) -- The best way to get a good answer is to ask a

Re: autoload

2007-09-13 Thread Chas Owens
On 9/13/07, lists user <[EMAIL PROTECTED]> wrote: > Hello, > > Why we need AUTOLOAD and what's the usage of $AUTOLOAD? > Can you show an example to help explain it?Thanks in advance. snip The AUTOLOAD subroutine is what Perl runs if it can't find the function you have requested. $AUTOLOAD is a pa

adding data to a file before it gets regexed

2007-09-13 Thread Pat Rice
hi all I have the following problem. I'm trying to read the a file in line by line. using a for each statment, but I want to modify each line as it come in so that I can add the file name that I am looking in to the line. eg. looing in file1.txt we have the line "hello world" I want to do the fo

Re: autoload

2007-09-13 Thread lists user
Really great answer.Thanks Chas. 2007/9/13, Chas Owens <[EMAIL PROTECTED]>: ... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: adding data to a file before it gets regexed

2007-09-13 Thread Chas Owens
On 9/13/07, Pat Rice <[EMAIL PROTECTED]> wrote: > hi all > I have the following problem. > I'm trying to read the a file in line by line. using a for each statment, > but I want to modify each line as it come in so that I can add the file > name that I am looking in to the line. > > eg. looing in

Re: adding data to a file before it gets regexed

2007-09-13 Thread Pat Rice
Thanks Chas for the reply what I'm trying to do is add the file name to the start of the string beign placed in the array, I havent used hashes so I'm not fiormlar with using hashes, but I am open to using them. The reasion I am trying to add the string to the line, is so that I can use it in a r

RE: adding data to a file before it gets regexed

2007-09-13 Thread Andrew Curry
But whats your end goal? What is it going to do at the end? -Original Message- From: Pat Rice [mailto:[EMAIL PROTECTED] Sent: 13 September 2007 14:16 To: Chas Owens Cc: beginners@perl.org Subject: Re: adding data to a file before it gets regexed Thanks Chas for the reply what I'm tryin

Re: Regex to matching Parenthesis

2007-09-13 Thread Jay Savage
On 9/7/07, John W. Krahn <[EMAIL PROTECTED]> wrote: > Aruna Goke wrote: > > > print $&, if $f=~m/\S+$/; > > perldoc perlre > [ snip ] > WARNING: Once Perl sees that you need one of $&, $`, or $' anywhere in > the > program, it has to provide them for every pattern match. This may >

Re: adding data to a file before it gets regexed

2007-09-13 Thread Pat Rice
thanks all for the replies, I'm trying to parse log files. so I got a bunch of logs in a directory, put them together and then parse them, I'm trying to keep a reference of the log files, so I know what log they came from, as I'm need to keep the file name to put it in to a another script. I thin

working with 3-dimensional array

2007-09-13 Thread Tim McGeary
Hi all, I'm trying to read in two file sets of library records, compare a regex that I find in different lines of each set of records, and then copy one whole line over to the other when a match is found. To do this, I am trying to use a 3-dimensional array: [fileset][record][line] I think t

Re: Regex to matching Parenthesis

2007-09-13 Thread Chas Owens
On 9/13/07, Jay Savage <[EMAIL PROTECTED]> wrote: snip > I'm actually a little confused about this. I never really thought > about it, but the doc seems to indicate that $1 is a s bad as $& ("the > same mechanism"). But then it implies that capturing parentheses only > affect particular patterns ("

RE: adding data to a file before it gets regexed

2007-09-13 Thread Moon, John
From: Pat Rice [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 11:14 AM To: Andrew Curry Cc: Chas Owens; beginners@perl.org; [EMAIL PROTECTED] Subject: Re: adding data to a file before it gets regexed thanks all for the replies, I'm trying to parse log files. so I got a bunch of log

Re: adding data to a file before it gets regexed

2007-09-13 Thread John W. Krahn
Moon, John wrote: thanks all for the replies, I'm trying to parse log files. so I got a bunch of logs in a directory, put them together and then parse them, I'm trying to keep a reference of the log files, so I know what log they came from, as I'm need to keep the file name to put it in to a an

RE: adding data to a file before it gets regexed

2007-09-13 Thread Moon, John
-Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 12:42 PM To: Perl beginners Subject: Re: adding data to a file before it gets regexed Moon, John wrote: > > thanks all for the replies, I'm trying to parse log files. > > so I got a bunch

Re: working with 3-dimensional array

2007-09-13 Thread Tom Phoenix
On 9/13/07, Tim McGeary <[EMAIL PROTECTED]> wrote: > I am trying to use a 3-dimensional array: > [fileset][record][line] I think you're telling us that the first dimension tells which fileset something is or was found in, the second tells which record within that fileset, and the third tells whic

Re: adding data to a file before it gets regexed

2007-09-13 Thread John W. Krahn
Moon, John wrote: From: John W. Krahn [mailto:[EMAIL PROTECTED] Here is another way to do it: my $logs_total = () = <*log>; my $processed = @ARGV = ; my %logs; $logs{ $ARGV }++ while <>; print "There are $logs_total logs HERE\n"; print "I processed $processed logs\n"; for my $filenm ( sort ke

RE: adding data to a file before it gets regexed

2007-09-13 Thread Moon, John
From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 2:01 PM To: Perl beginners Subject: Re: adding data to a file before it gets regexed Moon, John wrote: > From: John W. Krahn [mailto:[EMAIL PROTECTED] >> >> Here is another way to do it: >> >> my $logs_total = ()

Re: working with 3-dimensional array

2007-09-13 Thread [EMAIL PROTECTED]
On Sep 13, 4:23 pm, [EMAIL PROTECTED] (Tim McGeary) wrote: > Hi all, > > I'm trying to read in two file sets of library records, compare a regex > that I find in different lines of each set of records, and then copy one > whole line over to the other when a match is found. > > To do this, I am tryi

Win32::OLE help for saving file.

2007-09-13 Thread ash
Hello fellow scripters!! What stumps me is pretty straight forward. I need to save a Word file using Win32::OLE, but I need to replace an existing file if there is any. What properties do I have to set before calling SaveAs() to do that? Any help is appreciated. Thank you very much. -- To unsub

Linked lists

2007-09-13 Thread Somu
Hi list, Recently i've been learning a bit of C programming. I used data structures and then linked lists .. Does perl have this concept? Linked list helps in good memory management. Does perl automates memory management for us? Also, all the C variables are bound to be declared at the top, so that

Re: working with 3-dimensional array

2007-09-13 Thread Chris Charley
- Original Message - From: "Tim McGeary" <[EMAIL PROTECTED]> Hi all, I'm trying to read in two file sets of library records, compare a regex that I find in different lines of each set of records, and then copy one whole line over to the other when a match is found. ? To do this

Re: Linked lists

2007-09-13 Thread Chas Owens
On 9/13/07, Somu <[EMAIL PROTECTED]> wrote: > Hi list, > Recently i've been learning a bit of C programming. I used data > structures and then linked lists .. Does perl have this concept? > Linked list helps in good memory management. Does perl automates > memory management for us? Also, all the C

is it possible to building the perl pgms by using make/gmake??

2007-09-13 Thread sivasakthi
Hi guys, is it possible to building the perl programmes by using the make/gmake utility..?? Thanks, Siva

Re: Linked lists

2007-09-13 Thread Daniel Kasak
On Fri, 2007-09-14 at 08:45 +0530, Somu wrote: > Hi list, > Recently i've been learning a bit of C programming. I used data > structures and then linked lists .. Does perl have this concept? Hashes? I'm not sure what a linked list is. I've *briefly* read some stuff on C programming, but never rea

Re: is it possible to building the perl pgms by using make/gmake??

2007-09-13 Thread Chas Owens
On 9/14/07, sivasakthi <[EMAIL PROTECTED]> wrote: > Hi guys, > > is it possible to building the perl programmes by using the make/gmake > utility..?? snip That depends on what you mean. Perl modules are typically built using the following method tar xvfz Module.tgz cd Module perl Makefile.PL mak

Re: working with 3-dimensional array

2007-09-13 Thread Chris Charley
- Original Message - From: ""Chris Charley"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Thursday, September 13, 2007 11:55 PM Subject: Re: working with 3-dimensional array - Original Message - From: "Tim McGeary" <[EMAIL PROTECTED]> Hi all, I'm trying to

Re: Linked lists

2007-09-13 Thread John W. Krahn
Somu wrote: Hi list, Hello, Recently i've been learning a bit of C programming. Congratulations. I used data structures and then linked lists .. Does perl have this concept? No. C is a low level language and uses pointers to create linked lists and Perl does not have pointers. You co