Newbie question

2004-08-02 Thread Drue Reeves
Sorry for the newbie question but, I'm having trouble using the Perldap module. I downloaded the binaries and I am trying to install them into ActiveState's latest version of Perl for Windows. I put the contents of blib/lib/Mozilla from the zip file in the Perl/lib directory (where the rest of the

RE: Trying to understand this piece of code

2004-08-02 Thread Jenda Krynicky
From: Chris Devers <[EMAIL PROTECTED]> > On Mon, 2 Aug 2004, Bob Showalter wrote: > > sudhindra k s wrote: > >> Hi > >> > >> Can someone please tell me what the following code is trying to do > >> > >> > >> if ( /CR List/ .. /\(2\)/ ) { > >> if ( /CR List/ ) { print " $'\n"; } > >>

Re: Unusual Exporting

2004-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, James Edward Gray II said: >I'm still a little confused about why that works. Is it because after >the subroutine is "exported" it's called from inside the same namespace >as the hash and can manipulate it at will? Or am I just lost (quite >possible)? When you export a hash, you're no

Re: Unusual Exporting

2004-08-02 Thread James Edward Gray II
Sorry to answer my own question but... On Aug 2, 2004, at 1:37 PM, James Edward Gray II wrote: #!/usr/bin/perl package MyExporter; use strict; use warnings; use Exporter; our @ISA = 'Exporter'; our @EXPORT = qw/ %hash routine /; our %hash = (Test => 'Works!'); sub routine { my($caller) = ca

Unusual Exporting

2004-08-02 Thread James Edward Gray II
I have a module that needs to export a hash and a subroutine. I used "Exporter" and that's now happening, but there's a catch... I need the subroutine to make changes to that hash, when called. (I'm aware this is an unusual interface and I do have good reasons for wanting to do it.) I can't

perl.beginners Weekly list FAQ posting

2004-08-02 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

RE: Trying to understand this piece of code

2004-08-02 Thread Chris Devers
On Mon, 2 Aug 2004, Bob Showalter wrote: sudhindra k s wrote: Hi Can someone please tell me what the following code is trying to do if ( /CR List/ .. /\(2\)/ ) { if ( /CR List/ ) { print " $'\n"; } elsif ( /\(2\)/ ) {print " $` \n" ;} else { print "

RE: Trying to understand this piece of code

2004-08-02 Thread Bob Showalter
sudhindra k s wrote: > Hi > > Can someone please tell me what the following code is trying to do > > > if ( /CR List/ .. /\(2\)/ ) { > if ( /CR List/ ) { print " $'\n"; } > elsif ( /\(2\)/ ) {print " $` \n" ;} > else { print "$_\n";} >

Return values of "system"

2004-08-02 Thread Prasanna Kothari
Hi, I have a code snippet like: <> @args = "/bin/vi /tmp/t1.txt"; $val = system(@args); if($val != 0) { if($val == -1) { print "Execution failed $OS_ERROR\n"; exit; } else { print "Program exited with error code $? << 8\n"; exit; } } Notice that the code snippet is executing vi

Re: Searching and replacing text

2004-08-02 Thread Zeus Odin
Could you post the code you have written thus far? It would be a great help. -ZO "Chris Richards" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi Everyone, This is my first post to the list Please be gentle :) Just so we are all clear... I am completely lost right from the st

RE: Searching and replacing text

2004-08-02 Thread Chris Richards
Fair enough. -Chris -Original Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: Monday, 2 August 2004 10:08 PM To: [EMAIL PROTECTED] Subject: Re: Searching and replacing text Chris Richards wrote: > This is my first post to the list Please be gentle :) Sure. > Just

Re: Searching and replacing text

2004-08-02 Thread Gunnar Hjalmarsson
Chris Richards wrote: This is my first post to the list Please be gentle :) Sure. Just so we are all clear... I am completely lost right from the start with this one. It is far beyond my current Perl skills Oh? and I need some serious help :) Then, this is the most serious (and gentle) help I c

Re: Trying to understand this piece of code

2004-08-02 Thread Jenda Krynicky
From: "sudhindra k s" <[EMAIL PROTECTED]> > Can someone please tell me what the following code is trying to do > > if ( /CR List/ .. /\(2\)/ ) { > if ( /CR List/ ) { print " $'\n"; } > elsif ( /\(2\)/ ) {print " $` \n" ;} > else { print "

Searching and replacing text

2004-08-02 Thread Chris Richards
Hi Everyone, This is my first post to the list Please be gentle :) Just so we are all clear... I am completely lost right from the start with this one. It is far beyond my current Perl skills and I need some serious help :) I want to create a script that searches file_b for the first entry i

Trying to understand this piece of code

2004-08-02 Thread sudhindra k s
  Hi Can someone please tell me what the following code is trying to do if ( /CR List/ .. /\(2\)/ ) { if ( /CR List/ ) { print " $'\n"; } elsif ( /\(2\)/ ) {print " $` \n" ;} else { print "$_\n";} } I know that it is trying to

RE: Help on output formatting

2004-08-02 Thread Marcos . Rebelo
maybe you can do something like: ($text) = ($text =~ /([0-9]+)/); Before printing the text. > -Original Message- > From: sudhindra k s [mailto:[EMAIL PROTECTED] > Sent: Monday, August 02, 2004 10:52 AM > To: [EMAIL PROTECTED] > Subject: Help on output formatting > > >   > Hi > > I ha

Help on output formatting

2004-08-02 Thread sudhindra k s
  Hi I have a script which the following output: " abc 123456 xyz " Now as you can see apart from the number "123456" there are a lot of blank spaces and some aplha characters as well. Now i want the output to be only "123456" without the white spa