Re: Elegant quoted word parsing

2004-06-25 Thread Beau E. Cox
On Sunday 13 June 2004 02:39 am, Jeff 'japhy' Pinyan wrote: > On Jun 10, Beau E. Cox said: > >sub parse_words > >{ > >my $line = shift; > >my @words = (); > > > >$_ = $line; [snipped] Thank you, japhy, and others who took the time to help me fix my word parsing script I posted several

Win32::NetAdmin::LocalGroupGetMembers

2004-06-25 Thread perl.org
I need to get the members of a local group on a Windows 2000 server. I was reading the docs for Win32::NetAdmin (http://perlhelp.web.cern.ch/PerlHelp/site/lib/Win32/NetAdmin.html) which looks like the place to start, but it is giving me weird results (including beeps). Any suggestions? SIDs I c

RE: perl module installation

2004-06-25 Thread Larry Mullis
I have an iPlanet web server installed. Based on what you say, I need to be sure it is configured correctly to run scripts before I worry about modules. The permissions are set correctly on the files. I will be out of the office until July 6th. I will work on this whe I get back. I appreciate yo

Re: How to call a perl script....

2004-06-25 Thread Beau E. Cox
On Friday 25 June 2004 04:30 am, u235sentinel wrote: > Beau E. Cox wrote: > >On Thursday 24 June 2004 08:32 pm, Charlene Gentle wrote: > > > > > >You can use the 'system' command: > > > >##--master-- > >... > >my $rc = system "perl slave.pl"; > >... > > Does this mean it runs in parallel with the p

RE: A possibly stupid 'Perl' question?

2004-06-25 Thread Bob Showalter
Ron Smith wrote: > ... I only have access to > 'Windows' machines that do not have Perl installed at all. > Is there a way to use Perl on-line from such a machine? Go to http://www.activestate.com/Products/ActivePerl/ and install ActivePerl (free). > Is Perl small enough to > be installed on a fl

Re: A possibly stupid 'Perl' question?

2004-06-25 Thread Remo Sanges
On Jun 25, 2004, at 8:50 PM, Wiggins d Anconia wrote: I'm in a situation wherein I want to brush up on my 'Perl', but have no personal computer. I'm currently reading my way through "Learning Pearl", but can't do the exercises because I only have access to 'Windows' machines that do not have Perl i

Re: A possibly stupid 'Perl' question?

2004-06-25 Thread Wiggins d Anconia
> > I'm in a situation wherein I want to brush up on my 'Perl', but have no personal computer. I'm currently reading my way through "Learning Pearl", but can't do the exercises because I only have access to 'Windows' machines that do not have Perl installed at all. Is there a way to use Perl on-li

Re: A possibly stupid 'Perl' question?

2004-06-25 Thread James Edward Gray II
On Jun 25, 2004, at 1:25 PM, u235sentinel wrote: I haven't used it myself however I understand there is "Active Perl" for Windows available. I don't have any details but perhaps you could google for it or someone here could give you directions. No need to do this as it is available from http://w

Re: A possibly stupid 'Perl' question?

2004-06-25 Thread u235sentinel
I haven't used it myself however I understand there is "Active Perl" for Windows available. I don't have any details but perhaps you could google for it or someone here could give you directions. Ron Smith wrote: I'm in a situation wherein I want to brush up on my 'Perl', but have no personal c

A possibly stupid 'Perl' question?

2004-06-25 Thread Ron Smith
I'm in a situation wherein I want to brush up on my 'Perl', but have no personal computer. I'm currently reading my way through "Learning Pearl", but can't do the exercises because I only have access to 'Windows' machines that do not have Perl installed at all. Is there a way to use Perl on-line

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread Wiggins d Anconia
> > Wiggins d Anconia wrote: > > >It's dangerous to make blanket statements like this. Each is a tool that > >should be understood and applied in the right manner. > > > I agree with this. Generally system would be the right fit for many of > my Perl programs. However exec has it's place like

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread u235sentinel
Wiggins d Anconia wrote: It's dangerous to make blanket statements like this. Each is a tool that should be understood and applied in the right manner. I agree with this. Generally system would be the right fit for many of my Perl programs. However exec has it's place like any tool. That is w

Re: is perl a script language?

2004-06-25 Thread Randal L. Schwartz
> "Lfm" == Lfm <[EMAIL PROTECTED]> writes: Lfm> since it is a script language ,why not we write the *.pm directly and put to the lib directory(or other place) . Quick. Where *is* "the lib directory"? Yes, that's different on each machine. The Makefile.PL creates a makefile that knows *pr

Re: is perl a script language?

2004-06-25 Thread Randal L. Schwartz
> "Beau" == Beau E Cox <[EMAIL PROTECTED]> writes: Beau> 2. Even if a module is in pure-perl, the module developers support Beau> the use of the standard install because it, again, puts the modules Beau> in their correct places in the perl module tree across all platforms. And if a script is

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread Wiggins d Anconia
> > ok then I think system is more ideal for most situations. > It's dangerous to make blanket statements like this. Each is a tool that should be understood and applied in the right manner. That is why it is more important to understand the concepts of process execution, parallelism, blocking,

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread u235sentinel
Wiggins d Anconia wrote: perldoc -f exec Ok. makes sense. *** Since it's a common mistake to use "exec" instead of "system", Perl warns you if there is a following­ statement which isn't "die", "warn", or "exit"*** I've pretty much decided it's either system or a filehande proces

Re: Printing hash of hashes

2004-06-25 Thread Randal L. Schwartz
> "Lrmk" == Lrmk <[EMAIL PROTECTED]> writes: Lrmk> I used this code In a ASP code to display the entire content of hashes Lrmk> I did some changes to neke it pure perl it should be good for your job Instead of the core-module Data::Dumper? Why write your own? -- Randal L. Schwartz - Stone

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread Randal L. Schwartz
> "DBSMITH" == DBSMITH <[EMAIL PROTECTED]> writes: DBSMITH> from what I remember reading and was told as a best practice using exec DBSMITH> /...// was recommended over system. For this reason exec does not DBSMITH> create a child and therefore does not have to wait. the perl process

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread DBSMITH
ok then I think system is more ideal for most situations. thanks, Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams "Wiggins d Anconia" <[EMAIL PROTECTED]> 06/25/2004 12:40 PM To: u235sentinel <[EMAIL PROTECTED]>, [EMAIL PROTECTED] cc: Subject:Re:

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread Wiggins d Anconia
> > Exec will shell out and run whatever exec called. At least I believe > the correct term is "shell out". Learning Perl says in page 196 that > exec locates the program you called and jumps to it. There is no perl > process anymore. So I guess it's more of an exit Perl and run this > co

Re: Printing outside of foreach...

2004-06-25 Thread 'Paul Kraus'
Please reply to the group so others can help/learn for this. Can you send the rest of the code? that oks. Paul On Sat, Jun 26, 2004 at 12:31:09AM +0930, Daniel Falkenberg wrote: > Hi Paul, > > Thank you for yur reply. I have declared %stock_hash and I still can't > print all of the results out

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread u235sentinel
Exec will shell out and run whatever exec called. At least I believe the correct term is "shell out". Learning Perl says in page 196 that exec locates the program you called and jumps to it. There is no perl process anymore. So I guess it's more of an exit Perl and run this command sort of

Re: Help with 3D lists

2004-06-25 Thread Wiggins d Anconia
> > On Friday, June 25, 2004, at 11:33 AM, Wiggins d Anconia wrote: > > While you can dereference the array reference like you are doing, Perl > > allows a simpler syntax for readability when accessing into a > > reference, > > specifically the little arrow operator. So the above test can be >

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread DBSMITH
from what I remember reading and was told as a best practice using exec /...// was recommended over system. For this reason exec does not create a child and therefore does not have to wait. the perl process itself runs the command or program. what are the pros and cons of each? thanks

Re: 'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread u235sentinel
Wiggins d Anconia wrote: Not exactly, it has been forked and does technically run in parallel, however 'system' blocks your current process waiting for the child to finish, so your process is in fact running, but it won't be doing any work except for waiting for a signal from the child. There are

Re: Perl and Excel

2004-06-25 Thread James Edward Gray II
On Jun 25, 2004, at 10:44 AM, Naser Ali wrote: Hello All, Is there a way to move data from flat file to Excel spread sheet using perl? Definitely. Take a trip over to the CPAN. You're looking for the module, Spreadsheet::WriteExcel. Or, sometimes when I'm in a hurry and I don't need formatting

Perl and Excel

2004-06-25 Thread Naser Ali
Hello All, Is there a way to move data from flat file to Excel spread sheet using perl? Thanks

Re: Help with 3D lists

2004-06-25 Thread Patrick Pritchard
On Friday, June 25, 2004, at 11:33 AM, Wiggins d Anconia wrote: While you can dereference the array reference like you are doing, Perl allows a simpler syntax for readability when accessing into a reference, specifically the little arrow operator. So the above test can be written more simply as,

Re: Printing hash outside of foreach loop

2004-06-25 Thread James Edward Gray II
On Jun 25, 2004, at 10:12 AM, Daniel Falkenberg wrote: Hi Wiggins, Thank you for your reply. I will go and use the Finance::Quote::ASX module. For now though this problem is really bugging me and for my own sake I would like to get it to work. I have declared all my variables and am using warning

Re: Help with 3D lists

2004-06-25 Thread Wiggins d Anconia
> > As a perl novice, I'm unaware what I am doing wrong. Here's what I'm > working > with: > > use strict; > > my @newlist = ( > [ "yes", ['4', '5', '6'] ], > [ "no" ] > ); > > foreach my $foo1 (@newlist) { Right here $foo1 contains an array reference. >

Printing hash outside of foreach loop

2004-06-25 Thread Daniel Falkenberg
Hi Wiggins, Thank you for your reply. I will go and use the Finance::Quote::ASX module. For now though this problem is really bugging me and for my own sake I would like to get it to work. I have declared all my variables and am using warnings and strict. Unfortunarly I am still only able to print

Help with 3D lists

2004-06-25 Thread Patrick Pritchard
As a perl novice, I'm unaware what I am doing wrong. Here's what I'm working with: use strict; my @newlist = ( [ "yes", ['4', '5', '6'] ], [ "no" ] ); foreach my $foo1 (@newlist) { print "[EMAIL PROTECTED]"; if ($$foo1[0] eq "yes") { my @[E

'system' and parallel execution (was: Re: How to call a perl script....)

2004-06-25 Thread Wiggins d Anconia
> Beau E. Cox wrote: > > >On Thursday 24 June 2004 08:32 pm, Charlene Gentle wrote: > > > > > >You can use the 'system' command: > > > >##--master-- > >... > >my $rc = system "perl slave.pl"; > >... > > > > > Does this mean it runs in parallel with the parent Perl Program? > Reading through

Re: perl module installation

2004-06-25 Thread Wiggins d Anconia
> > > > > I have perl v5.6.0 installed on my AIX web server. I am not able to run perl scripts from the browser on this box. I have download from CPAN and attempted to load the modules that I think I need to be able to run perl scripts. I am putting them in /usr/bin. Once I downloaded, decompres

Re: How to call a perl script....

2004-06-25 Thread u235sentinel
Beau E. Cox wrote: On Thursday 24 June 2004 08:32 pm, Charlene Gentle wrote: You can use the 'system' command: ##--master-- ... my $rc = system "perl slave.pl"; ... Does this mean it runs in parallel with the parent Perl Program? Reading through "Learning Perl 3rd Edition" and I thought I c

perl module installation

2004-06-25 Thread Larry Mullis
> > I have perl v5.6.0 installed on my AIX web server. I am not able to run perl scripts > from the browser on this box. I have download from CPAN and attempted to load the > modules that I think I need to be able to run perl scripts. I am putting them in > /usr/bin. Once I downloaded, decomp

Re: Printing outside of foreach...

2004-06-25 Thread Wiggins d Anconia
> Hello again, > > The folling code takes some data from the Australian Stock Exchage > website. The problem I am having is that I need to be able to access > the hash of the hash outside of the foreach statement. So in other > words I would like to be able to access areas within the hash > %sto

Re: Perl script

2004-06-25 Thread James Edward Gray II
On Jun 25, 2004, at 2:49 AM, Jame Brooke wrote: #!/usr/bin/perl [snip code] I have few question regarding code above, 1. what the function for if ( $ARGV[0] =~ /^-([udm])$/ ) { $type = $1; shift @ARGV; } &convert(@ARGV); It's grabbing the command line switches, crudely. Better would be to

Re: Printing outside of foreach...

2004-06-25 Thread James Edward Gray II
On Jun 24, 2004, at 11:52 PM, Daniel Falkenberg wrote: Hello again, The folling code takes some data from the Australian Stock Exchage website. The problem I am having is that I need to be able to access the hash of the hash outside of the foreach statement. So in other words I would like to be a

RE: Printing hash of hashes

2004-06-25 Thread Bob Showalter
LRMK wrote: > if ($hash{$k} =~ m/=HASH/){ if (ref($hash{$k}) eq 'HASH') { perldoc -f ref -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Execute a sub: $sub

2004-06-25 Thread James Edward Gray II
On Jun 24, 2004, at 11:55 PM, Daniel Kasak wrote: Hi all. I have an object that I want to have execute some code that it gets told about when it's constructed. How do I go about that? ie: $self->{some_code_to_execute} will either have the name of a sub, or a reference to a sub, or something. I b

Re: newbie with RE problem

2004-06-25 Thread Jeff 'japhy' Pinyan
On Jun 24, [EMAIL PROTECTED] said: >Berkeley >Instructor: > >with this: >Berkeley > >Instructor: > > >catch, Berkeley also appears elsewhere in file but I only want it changed >if Instructor: follows > 8 #read in whole file > 9 undef $/; >10 >11 while(<>){ >12 s{ >

Re: Memory Parenthesis

2004-06-25 Thread Jeff 'japhy' Pinyan
On Jun 25, BOLCATO CHRIS (esm1cmb) said: >I am having a problem with memory parenthesis. In the following piece of >code the pattern matches but the $1 $2 $3 $4 variables are null. I can tell >the pattern matches because @foo has the line that matches. Any help would >be greatly appreciated. >

Re: Sending email via SMTP

2004-06-25 Thread Paul Kraus
Not sure what your trying to do but check out MIME::Lite from cpan. Great mod to easily send out emails via perl. Paul On Thu, Jun 24, 2004 at 03:43:53PM -0500, Mike Blezien wrote: > Hello, > > I'm looking at using the Net::SMTP module to send email as opposed to the > standard method of "sendm

Memory Parenthesis

2004-06-25 Thread BOLCATO CHRIS (esm1cmb)
Hello all, I am having a problem with memory parenthesis. In the following piece of code the pattern matches but the $1 $2 $3 $4 variables are null. I can tell the pattern matches because @foo has the line that matches. Any help would be greatly appreciated. @foo = grep(/^"$var",.+,.+,"(.+)","(

Re: is perl a script language?

2004-06-25 Thread Beau E. Cox
On Thursday 24 June 2004 11:09 pm, lfm wrote: > thank u > > Beau > > but i am stilled puzzled . > > since it is a script language ,why not we write the *.pm directly and put > to the lib directory(or other place) . > > I opened the *.pm and found there are only text . > > so ,why we build ? > > asp

Printing outside of foreach...

2004-06-25 Thread Daniel Falkenberg
Hello again, The folling code takes some data from the Australian Stock Exchage website. The problem I am having is that I need to be able to access the hash of the hash outside of the foreach statement. So in other words I would like to be able to access areas within the hash %stock_hash any wh

Re: Sending email via SMTP

2004-06-25 Thread Philipp Traeder
On Thursday 24 June 2004 22:43, Mike Blezien wrote: > Hello, > > I'm looking at using the Net::SMTP module to send email as opposed to the > standard method of "sendmail". > > Been reading through the docs on the module, but not real clear on how to > setup the "To:", "From:", "Reply-to:", "Subject

newbie with RE problem

2004-06-25 Thread pmd
Hi, perhaps someone could shed some light on this...here's what I'm trying to do: replace this pattern: Berkeley Instructor: with this: Berkeley Instructor: catch, Berkeley also appears elsewhere in file but I only want it changed if Instructor: follows here's the code that's not working: --

Re: Re: is perl a script language?

2004-06-25 Thread lfm
thank u Beau but i am stilled puzzled . since it is a script language ,why not we write the *.pm directly and put to the lib directory(or other place) . I opened the *.pm and found there are only text . so ,why we build ? asp need build too? the really reason that cause me to ask the ques

Re: is perl a script language?

2004-06-25 Thread Beau E. Cox
On Thursday 24 June 2004 09:46 pm, lfm wrote: > if so ,why we will "perl Makefile.PL;make;make test; make install during > the installation of the perl module > > if not ,why can "perl xxx.pl" be executed directly without any other > files produce? > > i am puzzled, very much! Yes, perl is a

Perl script

2004-06-25 Thread Jame Brooke
#!/usr/bin/perl $type = "u"; if ( $ARGV[0] =~ /^-([udm])$/ ) { $type = $1; shift @ARGV; } &convert(@ARGV); sub convert { my(@files) [EMAIL PROTECTED]; foreach my $file (@files) { next if (not -T $file ); print "Converting file: $file\n"; unless (open(I

is perl a script language?

2004-06-25 Thread lfm
if so ,why we will "perl Makefile.PL;make;make test; make install during the installation of the perl module if not ,why can "perl xxx.pl" be executed directly without any other files produce? i am puzzled, very much! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: How to call a perl script....

2004-06-25 Thread Gabor Urban
On Fri, 2004-06-25 at 08:32, Charlene Gentle wrote: I think you should ty the do 'filename' command. Look it up in the perlfunc manual on CPAN. Gabaux > Hi > > How do you call 'n perl script from within a perl script and return to > the scripts again. > > > > Thanx -- To unsubscribe, e-ma