RE:Re: grep utility

2001-09-17 Thread Brett W. McCoy
On Tue, 18 Sep 2001, Teresa Raymond wrote: > Just wondering about the exclamation mark here: > > > > @UNLOCKED = grep(!/LOCKED/g, @SAME); > > Would this be equivalent to using !~/LOCKED/g ? The ! is negating the regular expression's boolean value -- if the regular expression matches, it returns

RE:Re: grep utility

2001-09-17 Thread Teresa Raymond
Just wondering about the exclamation mark here: > > @UNLOCKED = grep(!/LOCKED/g, @SAME); Would this be equivalent to using !~/LOCKED/g ? --- - Teresa Raymond - - [EMAIL PROTECTED] - - http://www.mariposanet.com - --- --

Re: Index of foreach

2001-09-17 Thread Brett W. McCoy
On Tue, 18 Sep 2001, Andrea Holstein wrote: > > On Tue, 18 Sep 2001, Andrea Holstein wrote: > > > > > Try > > > for (my $i=0, my $var = $array[$i]; $i < @array; $i++, $var = > > > $array[++$i]) { > > >... > > > } > > > > Good Heavens! Why would you go to all of that trouble when a simple > >

Re: error in source code !

2001-09-17 Thread Teresa Raymond
Usually when it is a header error make sure you have the following correct: print "Content-type: text/html \n\n"; Also, FYI there is a beginner's cgi list: [EMAIL PROTECTED] >hi all. >when I run cgi form that write with perl. >this error shown in error log of system : > malformed header from sc

Re: Index of foreach

2001-09-17 Thread Andrea Holstein
"Brett W. McCoy" schrieb: > > On Tue, 18 Sep 2001, Andrea Holstein wrote: > > > Try > > for (my $i=0, my $var = $array[$i]; $i < @array; $i++, $var = > > $array[++$i]) { > >... > > } > > Good Heavens! Why would you go to all of that trouble when a simple > foreach will do? > You're right,

RE: Index of foreach [ot]

2001-09-17 Thread Sid Malhotra
Just a note, but I believe reading that in Perl6, we will have $# hold the current index of a for or foreach loop. Excellent idea I think. Sid. -Original Message- From: Andrea Holstein [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 10:45 PM To: [EMAIL PROTECTED] Subject: Re

Re: Help with Net::LDAP::LDIF

2001-09-17 Thread Andrea Holstein
William Skinner wrote: > > for (@entries){ > $res = $c->add($_); > warn "Error in add for ". $_->dn().": error code ".$res->code."\n" > if $res->code(); > } > print "The error message is: ".$res->error."\n"; > $c->unbind(); > > The error is; > > Can't call method "erro

Re: Index of foreach

2001-09-17 Thread Brett W. McCoy
On Tue, 18 Sep 2001, Andrea Holstein wrote: > Try > for (my $i=0, my $var = $array[$i]; $i < @array; $i++, $var = > $array[++$i]) { >... > } Good Heavens! Why would you go to all of that trouble when a simple foreach will do? -- Brett http://www.ch

Re: Index of foreach

2001-09-17 Thread Andrea Holstein
Rasoul Hajikhani wrote: > > Hi there, > is there any way to know what is the "current" index value in a foreach > loop? > > EX: > > foreach my $var (@array) > { > # need the index of the array > } > > Thanks in advance. > -r Try for (my $i=0, my $var = $array[$i]; $i < @array; $i++, $

Re: Perl - charts/graphs??

2001-09-17 Thread Andrea Holstein
Tiberiy Virtgaym wrote: > Any unauthorized copying, disclosure or distribution of the material in this e-mail >is strictly forbidden. What ?! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Can anyone see any better way to do this?

2001-09-17 Thread Andrea Holstein
Richie Crews schrieb: > > Here my code, I am looking for any way to optimize it so it will read > these log files slightly faster if possible... > ... > foreach $log (@blogs) { > print "Reading $log\n"; > open(LOG,"$log") or warn "Could not open $log: $!\n"

OS X and Perl [ was Re: CPAN Problems ]

2001-09-17 Thread Elaine -HFB- Ashton
Chris Zubrzycki [[EMAIL PROTECTED]] quoth: *> *>CCCMD = cc -DPERL_CORE -c -g -pipe -pipe -fno-common *>-DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -O3 *> *>weird. how hard is it to get changes like these into the source tree so *>it can be automatic? http://lists.perl.org/showlist.cgi?name=ma

Re: CPAN questions

2001-09-17 Thread Elaine -HFB- Ashton
[EMAIL PROTECTED] [[EMAIL PROTECTED]] quoth: *>Can someone please explain to how to keep perl version upgrades from breaking everything? a:) Don't upgrade :) Wise man say "No broke, don't fix." *>Most typically, it's a CPAN upgrade that installs a newer version of perl i.e. 5.005_03 to 5.6.1.

Help with Net::LDAP::LDIF

2001-09-17 Thread William Skinner
I could use some assistance with a problem I've not been able to solve. I created a perl script that will add a user to ldap using an ldif file. From the command line it works no problem but if I add it to the end of another working perl script I get errors and it does not work. The script I'm us

Extracting Data from word document file.

2001-09-17 Thread Rajeev Rumale
Hi, In the application which I am developing the user has to enter lot of data, I know its required in all application. Since the information which the user needs to enter is already available in a word doucment, file which is standared template used for communication. I think it would be much ea

RE: Removing duplicate PATH entries?

2001-09-17 Thread Gibbs Tanton - tgibbs
Well how about: my %paths; my @final; my $i = 0 $paths{$_} ||= $i++ for split /:/, $ENV{PATH}; $final[$paths{$_}] = $_ for keys %paths; $ENV{PATH} = join ':', @final; Tanton -Original Message- From: Jason Tiller To: [EMAIL PROTECTED] Sent: 9/17/2001 7:14 PM Subject: R

Fwd: Re: Can anyone see any better way to do this?

2001-09-17 Thread Curtis Poe
> Your parse_log() sub is, of course, what's taking up the time. If you provide us >with a little > sample data, that would help. In particular, I'm looking at: > > $split[6] =~ /$string/ D'oh! I forgot to mention why I'm looking at that :) If you can use "$split[6] eq $string", then th

Re: Can anyone see any better way to do this?

2001-09-17 Thread Curtis Poe
--- Richie Crews <[EMAIL PROTECTED]> wrote: > my $rahome = "/rahome/bridge_logs/logs/"; > my @bridges = ("80","81","82","83","84","85","86","87"); > my @checks = qw(alarm, ASSERTION, Bus, SYSERR, emt, bounce, arbitration, > Address, died, EMT, FAILURE, Illegal, > Retransmitting); Richie, This lo

Re: Removing duplicate PATH entries?

2001-09-17 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 17, Jason Tiller said: >2) Duplicate path entries must be removed from the *tail*, not the > head of the path. Then reverse the string, screw around with it, and reverse it again. >Any way to make Perl do the regexp's sdrawkcab? Well, you don't need to do any of the standard "sexeger"

Re: Removing duplicate PATH entries?

2001-09-17 Thread Paul Johnson
On Mon, Sep 17, 2001 at 03:25:20PM -0700, Jason Tiller wrote: > Hi, All, :) > > I'm trying to write a short script to remove duplicate entries in my > PATH variable. The script I use to do this is print join ":", grep !$seen{$_}++, split ":", $ENV{shift} > So, I want to write a script (in Pe

Can anyone see any better way to do this?

2001-09-17 Thread Richie Crews
Here my code, I am looking for any way to optimize it so it will read these log files slightly faster if possible... This is taking anywhere from 1min to 4mins depending on log file size... -- Begin of Code -- my $date = &get_date(); my $rahome = "/rahome/bridge_logs/logs/"; my @bridges = ("80

Re: Removing duplicate PATH entries?

2001-09-17 Thread Jason Tiller
Hi, Jeff! :) On Mon, 17 Sep 2001, Jeff 'japhy/Marillion' Pinyan wrote: > On Sep 17, Jason Tiller said: > It's pretty good. The only change I would make is to structure it in a > slightly more idiomatic fashion: > > my %paths; > $paths{$_}++ for split /:/, $ENV{PATH}; > $ENV{PATH} = join '

Re: Question

2001-09-17 Thread Brett W. McCoy
On Mon, 17 Sep 2001, Richard Zimmerman wrote: > I am a recent newcomer to Per land have been enjoying learning a new language. > However, I've got a question. In my looking around I've yet been able to find > an answer. > > In QuickBasic 7.1 (the old language I'm ditching) I used to be able to se

Re: Removing duplicate PATH entries?

2001-09-17 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 17, Jason Tiller said: >Assuming this is the way I want to go, here's what I've cooked up so >far: It's pretty good. The only change I would make is to structure it in a slightly more idiomatic fashion: my %paths; $paths{$_}++ for split /:/, $ENV{PATH}; $ENV{PATH} = join ':', keys

Re: Perl - charts/graphs??

2001-09-17 Thread Mel Matsuoka
At 04:33 PM 09/17/2001 -0500, randy Peterman wrote: >open (BOOK, "Programming Web Graphics with Perl and GNU software By Shawn P. >Wallace" -published => "O'reilly.") or die "I don't have enough money";. That book isn't bad, but it's sorely out of date, especially regarding the chapter on chartin

Removing duplicate PATH entries?

2001-09-17 Thread Jason Tiller
Hi, All, :) I'm trying to write a short script to remove duplicate entries in my PATH variable. I use Cygwin (Windows NT) and so I use perl from a bash prompt. Win32 programs *constantly* diddle with the PATH during installation and I'm sick of having to manually fix it up. So, I want to write

Question

2001-09-17 Thread Richard Zimmerman
I am a recent newcomer to Per land have been enjoying learning a new language. However, I've got a question. In my looking around I've yet been able to find an answer. In QuickBasic 7.1 (the old language I'm ditching) I used to be able to set where the cursor was on the screen (i.e.: locate 12, 2

Re: Perl - charts/graphs??

2001-09-17 Thread randy Peterman
open (BOOK, "Programming Web Graphics with Perl and GNU software By Shawn P. Wallace" -published => "O'reilly.") or die "I don't have enough money";. Then you could search for PerlMagick, or the module on CPAN called GD.pm. Randy Peterman "Tiberiy Virtgaym" <[EMAIL PROTECTED]> wrote in message

RE: Matching a pattern only once

2001-09-17 Thread Jason Tiller
Hi, Bob, :) Thanks for the detailed response! I figured I was on the right path, but confirmation greatly appreciated. :) On Mon, 17 Sep 2001, Bob Showalter wrote: > Now, can you tell why '~' is matched by > >/(?:^|[^~])~$/ Because the '(?:re1|re2)' is a zero-length, non-capturing anchor

Perl - charts/graphs??

2001-09-17 Thread Tiberiy Virtgaym
Hi there, I am quite new in Perl(the past 3 months or so), and the other day i came across a task where i would need to create charts, like pie/line charts, for some business applications i am developing using Perl. Does anybody know if there is software out there that would allow me to

RE: Date (Localtime)

2001-09-17 Thread Bob Showalter
> -Original Message- > From: Mellotto [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 17, 2001 3:47 PM > To: [EMAIL PROTECTED] > Subject: Date (Localtime) > > > Hi Folks, > When I execute: > > $hora = exec('date +%y%m%d%H%M%S '); > print " $$hora\n "; Er, that print line isn't bei

RE: Error installing Oracle DBD - Please Help

2001-09-17 Thread Balint, Jess
It seems as if you may want to check your ld.so.conf to point to the directory of 'blib/arch/auto/DBD/Oracle/Oracle.so' or link that file to somewhere else in your system that is in the path of somewhere in ld.so.conf. Once you have done that, re-run ldconfig to update you linker cache. That shoul

CPAN questions

2001-09-17 Thread bferrell
Back when I was first starting with Perl, an older, wiser programmer type introduced me to some of the mysteries of CPAN. I'm a system admin type, which means I cut myself regularly on Perl stuff. Can someone please explain to how to keep perl version upgrades from breaking everything? a:) M

Date (Localtime)

2001-09-17 Thread Mellotto
Hi Folks, When I execute: $hora = exec('date +%y%m%d%H%M%S '); print " $$hora\n "; I have the output in the following format (YYMMDDHHMMSS): 010917162026 How I could make to show the previous day? Cheers, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Error installing Oracle DBD - Please Help

2001-09-17 Thread Anderson, Carlin
We are experiencing problems when attempting to install the DBD on our production system. We have installed it without any issue on our QA system, and all of the programs are working just fine. Our systems configuration is as follows Production Application / web server = SUN E450, Sola

Re: Index of foreach

2001-09-17 Thread Brett W. McCoy
On Mon, 17 Sep 2001, Rasoul Hajikhani wrote: > Hi there, > is there any way to know what is the "current" index value in a foreach > loop? > > EX: > > foreach my $var (@array) > { > # need the index of the array > } Just index through the array this way: foreach my $var (0..$#array) {

Re: Index of foreach

2001-09-17 Thread P lerenard
you can run a counter inside the loop Pierre >From: Rasoul Hajikhani <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Index of foreach >Date: Mon, 17 Sep 2001 12:23:51 -0700 > >Hi there, >is there any way to know what is the "current" index value in a foreach >loop? > >EX: > >foreach my $var

Index of foreach

2001-09-17 Thread Rasoul Hajikhani
Hi there, is there any way to know what is the "current" index value in a foreach loop? EX: foreach my $var (@array) { # need the index of the array } Thanks in advance. -r -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Dumping paragraphs of text

2001-09-17 Thread Wagner-David
Here is one way: printf

Re: Jabber

2001-09-17 Thread Kevin Meltzer
Hi Russ, Have you looked into the Net::Jabber modules on the CPAN? Cheers, Kevin On Mon, Sep 17, 2001 at 01:55:07PM -0400, Russell Brooks ([EMAIL PROTECTED]) spew-ed forth: > Hi, > Someone has recently requested that I push some output from some perl > scripts to a jabber client. If anyone

Dumping paragraphs of text

2001-09-17 Thread Russell Brooks
Hi, Is there a more elegant and/or efficient way of dumping different paragraphs of text based on a logical test than imbedding multiple line print statements in the code? For instance, if (test) { print something; print ...; print ...; } else { print something else; print ...; print ...

Jabber

2001-09-17 Thread Russell Brooks
Hi, Someone has recently requested that I push some output from some perl scripts to a jabber client. If anyone has experience with this, is it just a combination of an open to the client (what is the syntax) and a write? Thanks Russ Brooks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

RE: Password Generators

2001-09-17 Thread Dean Theophilou
Hello: I'd like to say thanks (although somewhat belated) to everyone to responded to my question regarding password generation. You have all been very helpful. I got my program working the way I wanted it to. Thanks again. Dean Theophilou Genisar -Original Message- From: Ju

RE: hash assignment question

2001-09-17 Thread John Edwards
In that instance, $vars is referencing the hash %vars (as is is followed by {vNameL}). Brett was not using the same variable names as you were in your code, but simplified ones to explain the issue without clouding it in long and complicated variable names. Less typing too ;) What is this ... -

RE: hash assignment question

2001-09-17 Thread Bradshaw, Brian
This did it. I defined the hash and then did the key/value assignments like this: %arr_criteria_hash = (); sub ShowCriteria { #($theKey, $theValue, $theName) { $arr_criteria_hash{@_[0]} = @_[1]; ... } I did this so I can read it with a while loop. I didn't want bl

Re: hash assignment question

2001-09-17 Thread Brett W. McCoy
On Mon, 17 Sep 2001, Bradshaw, Brian wrote: > I am trying to assign key/value pairs to a hash based on whether a variable > from an HTML form has a value or not. > > I have the code: > if ($vSalutation) > { > %arr_criteria = ("salutation" => $vSalutation); > print "\n"; > print "Salutation:

Fetching network info

2001-09-17 Thread P lerenard
Hi, where could I get some information about those function because perdoc.com don't give any? Thank you Pierre _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTE

RE: hash assignment question

2001-09-17 Thread John Edwards
Try the code below... if ($vSalutation) { $arr_criteria{"salutation"} = $vSalutation; print "\n"; print "Salutation:"; print " $vSalutation \n"; print "\n"; } if ($vNameL) { $arr_criteria{"last_name"} = $vNameL; print "\n"; print "Last Name:"; print " $vNameL \n"; print "\n";

Re: bless function

2001-09-17 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Baby Lakshmi) wrote: > I really dont understand the functionality and advantages of using bless. bless() "tags" a reference with a package name, effectively turning it into an object. without bless you don't have objects. http://www.perld

hash assignment question

2001-09-17 Thread Bradshaw, Brian
Hi List, I am trying to assign key/value pairs to a hash based on whether a variable from an HTML form has a value or not. I have the code: if ($vSalutation) { %arr_criteria = ("salutation" => $vSalutation); print "\n"; print "Salutation:"; print " $vSalutation \n"; print "\n"; } if ($

perl module: GD::Graph::pie

2001-09-17 Thread Dan Lee
Hi, I try to make a pie graph, let's say based on the dataset as following: {["EST", "NP", "ET"], [30476, 2348, 439]} My pie graph is expected to have three parts labelled as EST, ET and NP. I only found some information on manual page for GD::Graph, which provides very limited information on

Re: help please.....array and coding problem

2001-09-17 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 17, Rahul Garg said: >while( ($details_1 = shift(@lines) ) =~ /^$/ ) You have the logic backwards. Change the =~ to a !~ instead. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ *

Re: bless function

2001-09-17 Thread Jeff 'japhy/Marillion' Pinyan
On Sep 17, baby lakshmi said: >should we have to use the bless fuction in the constructor alone we can >use the created object ($foo) to invoke the function. isnt it??? so whatz >the real advandage of using bless function??? and why we need to bless that >particular object to some specific

RE: Problem Building Module...

2001-09-17 Thread Bob Showalter
> -Original Message- > From: David Simcik [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 17, 2001 10:35 AM > To: Perl Beginners > Subject: Problem Building Module... > > > Hi all, > Trying to build XML-XPath.pm. I keep on getting this > error when I run make > (Win 2000, rec

Problem Building Module...

2001-09-17 Thread David Simcik
Hi all, Trying to build XML-XPath.pm. I keep on getting this error when I run make (Win 2000, recent ActiveState Perl Build): Makefile:740: *** missing separator. Stop. I'm hoping it's a silly problem, but I'm pretty clueless when it comes to Make. Thanks! DTS -- To unsubscribe, e-m

query_string variable null in perl

2001-09-17 Thread Anjani Jha
Hi there! I am using Oracle HTTP server (apache). The perl scripts run properly. OS is solaris 2.6. But perl scripts show env variable blank. why could be that ? Anjani -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Directory scan

2001-09-17 Thread Ron Rohrssen
Here's a little code snippet that could be modified to suit your needs. use Win32::OLE qw(in with); use File::Basename; my ($FileName, $folder, $ext); opendir(NT, $folder) || die "Didn't find folder"; foreach $FileName (sort readdir(NT))# list context, sorted {

Re: help please.....array and coding problem

2001-09-17 Thread Jos I. Boumans
what you probably want is this: for(@lines){ last unless $_; # your stuff; } hth, Jos @lines is an array which contains blank lines as well as textlines...what i want to do is to get a line from array thru shift(@lines) until the array doesnt contain the textline or array has no more li

RE: Matching a pattern only once

2001-09-17 Thread Bob Showalter
> -Original Message- > From: Jason Tiller [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 14, 2001 5:41 PM > To: '[EMAIL PROTECTED]' > Subject: RE: Matching a pattern only once > > > Hello, Again, Bob, :) > > On Fri, 14 Sep 2001, Bob Showalter wrote: > > > You can use look-behin

help please.....array and coding problem

2001-09-17 Thread Rahul Garg
@lines is an array which contains blank lines as well as textlines...what i want to do is to get a line from array thru shift(@lines) until the array doesnt contain the textline or array has no more line(element)..how i should implement the red part while( ($details_1 = shift(@lines) ) =~

Code problem

2001-09-17 Thread Rahul Garg
@lines is an array which contains blank lines as well as textlines...what i want to do is to get a line from array thru shift(@lines) until the array doesnt contain the textline or array has no more line(element)..how i should implement the red part while( ($details_1 = shift(@lines) ) =~ /^$/

passing info from a html form to a perl script

2001-09-17 Thread Sebastian Pucilowski
hello, i am in the process of making a few scripts for my webserver. i have the usual log parsers and system info scripts, but how would i post information to a script. for example: http://server/cgi-bin/stats.pl?type="apachelog"; thankyou, Sebastian Pucilowski -- To unsubscribe, e-mail: [E

screen capture anyone?

2001-09-17 Thread Joseph G. Mercado
Hi, can anyone help me find a perl script that capture screen content -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: whats the equivalent ot break

2001-09-17 Thread Sudarsan Raghavan
perldoc -f last "Joseph G. Mercado" wrote: > Hi, Whats the equivalent of break in perl > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

whats the equivalent ot break

2001-09-17 Thread Joseph G. Mercado
Hi, Whats the equivalent of break in perl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: bless function

2001-09-17 Thread baby lakshmi
Hello Jeff, Thank you for ur reply. > >package Animal; > >sub named { > > my $class = shift; > > my $name = shift; > > bless \$name, $class; > >} > >sub eat{ > > my $class = shift; > > $class = ref($class) || $class; > > my $food = shift; > > print "$class eats $food\n"; > >} > >

Re:Set up issue

2001-09-17 Thread Jorge Goncalvez
- Begin Forwarded Message - Hi, I made a perl tk software which runs under Windows.Its name is frame14.pl. Now I wanted to create a set up program which could create in the Windows desktop a group of progra which contains one icon called "Boot server". By double click