perl graph modules

2002-10-05 Thread Zysman, Roiy
Hi All, Any one know of a good free graph modules other than gdchart ? 10x Roiy

Passing wildcards in filenames

2002-10-05 Thread Patel, SamirX K
If I want to run a script on any file with a .vhd extension in the directory, how do I pass *.vhd to the perl script? Easy one-line example (Note, I'm running on Windows): Say I want to find the pattern "COMPONENT" in any file with a .vhd extension: perl -lane "if (/COMPONENT/) { printf \"$AR

Re: Group and concatenate

2002-10-05 Thread James Edward Gray II
perl -pe 's/^(\d+\s+)([a-zA-Z]+)\s+([a-zA-Z]+)$/$1$2;$3/' infile >outfile On Saturday, October 5, 2002, at 06:02 PM, Paul Van Dalen wrote: > Hi Gang, > > Given this input: > > 222xxxJ > 222wwwDD > 222ccffFFF > 909eee > 909FFF > 909j

Re: Group and concatenate

2002-10-05 Thread Paul Johnson
On Sat, Oct 05, 2002 at 07:02:09PM -0400, Paul Van Dalen wrote: > Hi Gang, > > Given this input: > > 222xxxJ > 222wwwDD > 222ccffFFF > 909eee > 909FFF > 909j > 888JJJ > 888HHH > > I'd like to split the

Group and concatenate

2002-10-05 Thread Paul Van Dalen
Hi Gang, Given this input: 222xxxJ 222wwwDD 222ccffFFF 909eee 909FFF 909j 888JJJ 888HHH I'd like to split the input, group it by the first column, and, for that group, print out a concatenated second col

Safe.pm examples?

2002-10-05 Thread David Garamond
i'm looking for something like a sandbox/compartment (like rexec module in python) so that i can be [reasonably] confident running untrusted snippets of code from inside the same process. Safe.pm seems like the perl way of doing it, right? however, from what i skimmed from the posts i got from go

Re: WHO IS NAVER-MAILER@naver.com ???

2002-10-05 Thread David Garamond
[EMAIL PROTECTED] wrote: > Every time I send a message to this list, I receive a message from > [EMAIL PROTECTED] immediately afterwards. It appears to be garbage > (lots of screwy characters...). > > Where is this coming from? Am I the only one receiving these? i suspect there is/are bounci

RE: how to pass a list to a subroutine?

2002-10-05 Thread nkuipers
>= Original Message From James Edward Gray II <[EMAIL PROTECTED]> = >If you want it in hash form, as it looks from your example, just copy >it to a hash: > >my %hash = @_; Remember though that if you are passing anything in scalar context, like an scalar or a reference, or more than one

Re: how to pass a list to a subroutine?

2002-10-05 Thread James Edward Gray II
If you want it in hash form, as it looks from your example, just copy it to a hash: my %hash = @_; On Friday, October 4, 2002, at 11:57 PM, Grant Byers wrote: > Is there a simple way to unflatten @_ into a list within a subroutine? > ie: > > sub mySub(%); > mySub(arg1=>'val1',arg2=>'val2',arg

Re: how to pass a list to a subroutine?

2002-10-05 Thread John W. Krahn
Grant Byers wrote: > > Is there a simple way to unflatten @_ into a list within a subroutine? > ie: > > sub mySub(%); > mySub(arg1=>'val1',arg2=>'val2',arg3=>'val3') > > now i want to expand @_ back into a list. Did you read the perlsub document that is supplied with Perl? perldoc perlsub J

Re: Check for empty array

2002-10-05 Thread John W. Krahn
Dharmender rai wrote: > > You can use defined() function by checking for the > first element. No, checking the first element of an array will tell you whether or not the first element of the array is defined, it will not tell you if the array is empty. John -- use Perl; program fulfillment -

Re: Will not read line and split.

2002-10-05 Thread dan
the reason to this being you need to append "my" to declare each variable before use.. my $file; my $in_dir; my $tstopen; etc.. try phrase it like this: #!/usr/bin/perl use strict; use warnings; # Open Files my $in_dir; opendir(IN_DIR, "/opt/crxml/tstdir") or die "directory does not exist"; # R

how to pass a list to a subroutine?

2002-10-05 Thread Grant Byers
Is there a simple way to unflatten @_ into a list within a subroutine? ie: sub mySub(%); mySub(arg1=>'val1',arg2=>'val2',arg3=>'val3') now i want to expand @_ back into a list. Cheers, Grant -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Genetic algorithms applied with Perl

2002-10-05 Thread Frank Carlos
Here's food for thought: One of the more intriguing types of algorithm is the genetic algorithm. Genetic algorithms mimic Darwinian natural selection, where "fitness" selects individuals for survival, breeding, and, hence, adaptive mutation. "Genetic algorithms applied with Perl" covered the

Re: Check for empty array

2002-10-05 Thread Michael Fowler
I just noticed this thread, so forgive me if someone has already mentioned this, or if I'm missing the original point. I just saw some bad examples of how to accomplish what the subject asks, and felt I should chime in. The idiomatic method for checking if an array has elements is simply: i

Re: Using modules without root privlidges

2002-10-05 Thread Paul Johnson
On Fri, Oct 04, 2002 at 05:09:34PM -0700, Ramon Hildreth wrote: > Hi, I use perl in a restricted environment and I don't have access to > load modules that aren't there. I would like to > Use additional modules and/or create some of my own. > > Is there a workaround for this? When installing a