Re: form generator Perl... (The Holy Grail)

2008-10-22 Thread Wiggins d'Anconia
Pat Rice wrote: > Hi all > I'm wondering whats the best tool (preferably) open source, To use to > generate HTML forms in Perl that I can link in to a database after, > with optimistically code that is generated in a readable way. > > The holy grail would be: > - type out the form names for each

Re: CPAN installs

2007-01-15 Thread Wiggins d'Anconia
Kevin Viel wrote: I am attempting to install modules on a Solaris v10 computer for which I do not have root privileges. I see in MyConfig.pm that the build directory is local: 'build_dir' => q[/home/kviel/.cpan/build] Where does it install the (built) module? Thank you, Kevin The build

Re: Formatting/presenting regex

2007-01-03 Thread Wiggins d'Anconia
Owen wrote: I have this regex to look at an Apache log. There are modules to help with that task on CPAN. m/^(\S+) \S+ \S+ \[(\d{2})\/(\S+)\/(\d{4}):.+\] "(\w+) (\S+) ([^"]+)" (\d{3}) (\d+|-) ".+"$/; Would like to set it out in a bit more readable form a la Perl Cook Book and others eg m

Re: Negate a regular expression

2006-12-29 Thread Wiggins d'Anconia
Mathew Snyder wrote: Ken Foskey wrote: On Fri, 2006-12-29 at 23:36 -0500, Mathew Snyder wrote: I'm trying to set up an if clause to exit if an answer given is anything but either any case combination of 'y' or 'yes'. This is what I have: exit if $ans =~ m/[^y|^yes]/i; exit if $ans =~ m/^(y|

Re: Best book to update XML via Perl?

2006-11-06 Thread Wiggins d'Anconia
C.R. wrote: Hi, I have Perl 5.6.0 on Solaris, and on DOS. We have an XML document that has many prices in it that need to be changed. They are keyed by part number, and each part has a price grade, each grade has a price. I know there are many tools that Perl can use to update XML. Which one

Re: Crypt::GPG won't decrypt file...rewrote it to use system, but only partially works

2006-06-30 Thread Wiggins d'Anconia
RICHARD FERNANDEZ wrote: > I re-wrote the decryption routine to use system instead of Crypt::GPG, > and came across another puzzle: > > my @gpg_command = ("/usr/bin/gpg --decrypt $encrypted > > $decrypted 2> /dev/null"); > system(@gpg_command) == 0 or warn "system @gpg_command failed:

Re: How to manage around 1000 entries which will constantly be changing

2006-03-31 Thread Wiggins d'Anconia
Mr. Shawn H. Corey wrote: > On Fri, 2006-31-03 at 15:45 -0800, Tom Phoenix wrote: > >>You should loop over the input, pushing each item on to an array. If >>at any time you have 2000 items in the array, sort them and discard >>any you don't want to keep. >> >>$#data = 999 if $#data > 999;

Re: Expect script to install sshkey

2006-03-02 Thread Wiggins d'Anconia
Ramprasad A Padmanabhan wrote: > Hi all, >I have a perl Expect script that install rsa keys for ssh auto login. > When I run the script on command line it works fine. > Now when I run it inside a CGI the script simply gets stuck. I can see > from the from the SSH server and also the expect log

Re: Help: Math::Pari won't install

2006-02-28 Thread Wiggins d'Anconia
RICHARD FERNANDEZ wrote: > > Thanks for the response. I did manage to solve the Math::Pari install > problem by following Jeff Eggen's idea about configuring it with > machine=none. I have no idea about whether or not, as he mentions, it's > unusably slow because I proceeded with the rest of the

Re: Help: Math::Pari won't install

2006-02-28 Thread Wiggins d'Anconia
RICHARD FERNANDEZ wrote: > I'm trying to build Math::Pari along the way to building Net::SFTP, but > the make fails with the following error: > > pariinl.h: In function `mulssmod': > pariinl.h:887: error: asm-specifier for variable `hiremainder' conflicts > with asm clobber list > pariinl.h:887: c

Re: Help With signals.

2006-01-06 Thread Wiggins d'Anconia
be single quoted, and you have to call the SIG hash as a hash... http://danconia.org > > I get a like result it does not work as desired and a complete lack of quotes > gives me a > segmentation fault. > > > On Fri, 2006-01-06 at 15:37 -0700, Wiggins d'Anconia wrote: &g

Re: Help With signals.

2006-01-06 Thread Wiggins d'Anconia
Leif Ericksen wrote: > I am trying to set up a routine to trap signals so that I can pass it to > a sub that will act on the signals and it does not seem to be > functioning as I would think. > > SAMPLE: > I will admit some of the code was taken from the camel book. :) I do > have use strict on

Re: Subst string

2005-12-16 Thread Wiggins d'Anconia
MARG wrote: > Hi, > > I'm trying to subst the string: > # Include conf/extra/httpd-ssl.conf > > for > Include conf/extra/httpd-ssl.conf > > with the command: > perl -pi~ -e 's/# Include conf/extra/httpd-ssl.conf/Include > conf/extra/httpd-ssl.conf/' /usr/local/httpd/conf/httpd.conf > > but i ge

Re: Constant Hash problem

2005-12-16 Thread Wiggins d'Anconia
Kevin Old wrote: > Hello everyone, > > I'm trying to define a constant hash and have the following: > > use constant STOPWORDS => map { lc $_ , 1 } qw(a about above across adj > after); > > I do not get a hash from this. > > This does work, however: > > my %stopwords = map { lc $_ , 1 } qw(a

Re: sub args as pointers or values?

2005-12-16 Thread Wiggins d'Anconia
Bryan R Harris wrote: > > I remember from my C++ class that when you pass arguments to subroutines you > can pass them either as a pointer to the real variable (so you modify the > original if you change it), or as a copy (which you can change all you want > and not affect the original). > > Is t

Re: running child processes

2005-12-15 Thread Wiggins d'Anconia
Octavian Rasnita wrote: > Hi, > > Is it possible to create more child processes and let them run, but close > the main program immediately? > > I have read (in perldoc perlfork) that: > > A way to mark a pseudo-processes as running detached from their parent > (so that the parent would n

Re: How do you determine if a file is a symlink?

2005-12-15 Thread Wiggins d'Anconia
RICHARD FERNANDEZ wrote: > According to the docs, if you stat a symlink, you will get information > for the target file, and lstat works on symlinks... > > I'm confused. How do you determine if a file is a symlink to begin with? > > TIA > > richf > perldoc -f -l if (-l $file) { # file is a

Re: reference assignment - lol

2005-12-13 Thread Wiggins d'Anconia
Dermot Paikkos wrote: > Hi, > > I am a bit stuck with references and was hoping someone could help me > out. > > In File1 I need to isolate the last number in the column and see if > it exists in file2. If so, I would like to add the content of the > line from file1 and print it out. There may

Re: aliasing a function

2005-12-11 Thread Wiggins d'Anconia
JupiterHost.Net wrote: Just a mental exercise :) What is the best way to "alias" a function, for instance: you can call it: sub say_it_loud( print @_ ); or use a type glob, etc What I'm trying to figure out is say you wanted to alias a function that is context sensitive? What I mean is s

Re: Parameterizing a module

2005-12-08 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: > I see. Thanks Shawn. Since we are at it, would you mind explaining a little > bit > about the significance of "our" keyword. I have never understood it properly. > Most books that I referred to say that it's a "lexically-scoped global > variable". What does that mean? I

Re: OOP inheritance question (simple)

2005-12-07 Thread Wiggins d'Anconia
Ken Farmer wrote: > > Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > > See the other posters responses as well, but I think it might help if > you read through some docs on OOP programming, check out: > > perldoc perlboot > perldoc perltoot > perldoc perlto

Re: Parameterizing a module

2005-12-07 Thread Wiggins d'Anconia
Todd W wrote: [snip] > you could do something like this: > > $ cat TestMod.pm > use warnings; > use strict; > > package TestMod; > > use Exporter; > > sub import { > my $class = shift; > foreach my $module ( @_ ) { > require $module; > } > } > > 1; > > $ cat testrun.pl > use warni

Re: Parameterizing a module

2005-12-07 Thread Wiggins d'Anconia
Shawn Corey wrote: > [EMAIL PROTECTED] wrote: > >> In my script, I load the module by saying "use PerlMQ;". However, now >> I want to >> load only certain use statements from the module depending on the >> parameter I >> give it. For example, in my script, I want to say "use PerlMQ >> qw(some_para

Re: OOP inheritance question (simple)

2005-12-07 Thread Wiggins d'Anconia
Ken Farmer wrote: > I have tried this question in a couple of other places but the answers are > far above my current level of understanding of oop - which is the level of > very interested newbie - real newbie. So here goes again. > > I make an empty (of data) perl object1 with an included m

Re: Parameterizing a module

2005-12-07 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: > Hi all, > > I have a module which does nothing but include a bunch of use statements > (Shawn > Corey, I think you taught me how to do that).It looks like this: > > -- > #PerlMQ.pm > > use

Re: when do vars go out of scope in this case?

2005-12-06 Thread Wiggins d'Anconia
Dr.Ruud wrote: > Wiggins d'Anconia: > > >>the memory will still be available to the same process, >>so it will not be available to other programs for instance until the >>program has ended. > > > And even that is not entirely true, because the memor

Re: when do vars go out of scope in this case?

2005-12-06 Thread Wiggins d'Anconia
JupiterHost.Net wrote: > I just had a discussion about variables going out of scope (for memory > considerations) > > The idea was presented that variables go out of scope as soon they're > last referenced in a block, I always thought it was when the block ended. > When a var goes out of scope an

Re: A Strange Syntax

2005-12-05 Thread Wiggins d'Anconia
Adriano Ferreira wrote: > On 12/5/05, Jennifer Garner <[EMAIL PROTECTED]> wrote: > >>print ${*{$::{sym}}{HASH}}{name}; > > >>How to analyse the last sentence of that code?Thanks. > > >>From "perldoc perlref" > >7. A reference can be created by using a special syntax, lovingly >

Re: File Test Question

2005-11-30 Thread Wiggins d'Anconia
Dave Adams wrote: > *My Code:* > > my $logfile = "logfile_with_content"; > if (-w $logfile) { > print ("True - file exists but empty"); > } > if (-s $logfile) { > print ("True - file exist and has content"); > } > > *My Output:* > > True - file exists but empty True - file exist and has

Re: You've read the Llama, now what?

2005-11-28 Thread Wiggins d'Anconia
Randal L. Schwartz wrote: "Tom" == Tom Yarrish <[EMAIL PROTECTED]> writes: Tom> So it makes it difficult for me to apply what I've read from the Tom> O'Reilly books to real world problems (and I've read the Llama Tom> book a few times). But have you also read the Alpaca? That's the natural "

Re: help with matching

2005-11-09 Thread Wiggins d'Anconia
Rob.Savino wrote: > I'm working on a simple script to get a list of users who do not exist > > while (<>) { > $user = system("echo $_"); > $result = system("dsquery user -samID $_"); > } > if (!$result) { > print "$user\n"; > } > > Here is my problem, > > dsquery user -samID sh

Re: Which logger do I want? Or write my own? How?

2005-11-03 Thread Wiggins d'Anconia
Siegfried Heintze wrote: > I have a couple of batch jobs that run every couple of hours. They scrape > web sites and populate an MSAccess database. > > I would like to write a GUI to monitor them. Presently all my diagnostic > print statements just scroll by and they are very hard to read. > > I

Re: problem using a module

2005-10-28 Thread Wiggins d'Anconia
jm wrote: > On 10/28/05, Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > > >>That seems like a very odd error. One thing I do notice is that you are >>including "DBI" in the path to 'use lib'. This would have to mean that >>the DBI mo

Re: problem using a module

2005-10-28 Thread Wiggins d'Anconia
jm wrote: > i'm modifying a script to run on a sun box that i do not have > privileges to install modules in the normal perl paths. subsequently > i installed DBI.pm into a modules subdir under my home dir. below are > the 2 relevant lines: > > > use lib "$ENV{HOME}/modules/DBI"; > > our $mysq

Re: Is this script safe?

2005-10-27 Thread Wiggins d'Anconia
Ryan Frantz wrote: [snip] >>(my $new = $name) =~ tr/[a-z]/[A-Z]/; # trans the > > > Alternatively, you could use the 'uc' function instead of 'tr'. > > perldoc -f uc > At the very least remove the [], tr does not take a regular expression so the brackets above do not represent

Re: extract zip file

2005-10-26 Thread Wiggins d'Anconia
Tommy Nordgren wrote: > > Oct 26, 2005 kl. 7:56 PM skrev Wiggins d'Anconia: > >> Tommy Nordgren wrote: >> >>> >>> Oct 25, 2005 kl. 6:21 AM skrev Pant, Hridyesh: >>> >>> >>>> Hi All, >>>> How to extract zip fil

Re: extract zip file

2005-10-26 Thread Wiggins d'Anconia
Tommy Nordgren wrote: > > Oct 25, 2005 kl. 6:21 AM skrev Pant, Hridyesh: > >> Hi All, >> How to extract zip file using perl program... >> >> Thanks >> Hridyesh >> >> -- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >>

Re: how to avoid process die when can't create mysql dbh

2005-10-26 Thread Wiggins d'Anconia
Jeff Pan wrote: > hi, > > Because of network problem,my script can't create Mysql dbh sometime > when running,then it died.I have written code like this: > > my > $mysql_dbh=DBI->connect("dbi:mysql:$mysql_db:$mysql_host",$mysql_user,$mysql_passwd, > {PrintError =>

Re: HUP vs signal 9

2005-10-24 Thread Wiggins d'Anconia
Christopher Spears wrote: > What is the difference between > > kill 1, SIGNAL > > and > > kill 9, SIGNAL ? > > By reading books and talking to people, I figured out > that kill 1 is the HUP (hang up signal) and kill 9 is > the kill signal. Don't they do the same thing (i.e. > terminate a pro

Re: Finding all the files in a PC

2005-10-22 Thread Wiggins d'Anconia
Andrew McHorney wrote: > Hello > > I am planning on developing a perl script that will find all the > duplicate files (name, size and content) on a pc and remove the > duplicate files. I have written a few scripts on a unix platform but non > yet for a pc in a windows environment. Can someone prov

Re: Config File Layout

2005-10-20 Thread Wiggins d'Anconia
Ryan Frantz wrote: > Perlers, > > > > I'm working on a script that will need to email clients if it finds > files in their respective outbound directories. I've decided on a > simple config file: > > > > [foo] > > [EMAIL PROTECTED] > > > > [bar] > > [EMAIL PROTECTED] > > [EMAIL PROT

Re: Need Some Guidance

2005-10-20 Thread Wiggins d'Anconia
Gladstone Daniel - dglads wrote: > I noticed that there is various version of > > Learning Perl + Perl Cookbook > > The most version (Version 4) costs the most. Does it matter the version > if > I want to learn or do I need to get the most recent version? > > What is the groups thoughts? >

Re: Project planning

2005-10-20 Thread Wiggins d'Anconia
Steve Bertrand wrote: > Hi everyone, > > This question may seem odd, but here goes anyway. > > I've been working at an ISP for a few years now, and have been adding > to/modifying their current accounting system since I've got here. Of > course it is all Perl based. > > This isn't a technical pr

Re: Sending HTML file as mail from mail command (mail -s )

2005-10-13 Thread Wiggins d'Anconia
Josh Brown wrote: > Mazhar wrote: > >> Hi Folks, >>i have a requirement where in i need to send alerts to a set >> of users for which i have developed a script and it is working fine. >> For the body of the mail i am writing into a text file everytime and i >> am sending across using the c

Re: Formatting Variables

2005-10-12 Thread Wiggins d'Anconia
Ryan Frantz wrote: > Perlers, > > > > Is there are way to format a variable before placing it into an array or > hash? I have several variables that contain floating point numbers that > I format prior to printing out: > > > > my $float = "12.3456"; > > print "%2.1f\n", $float; > perld

Re: TEST

2005-10-06 Thread Wiggins d'Anconia
Peter Scott wrote: > On Thu, 06 Oct 2005 05:42:59 -0400, Tom Allison wrote: > >>>So make tests that just run the scripts and then examine the outputs. >>>If there are unwanted side effects you can't undo from the test then >>>you need to modify the script in some way. >> >>Is this where 'do' come

Re: question about # of files in a directory

2005-09-28 Thread Wiggins d'Anconia
ZHAO, BING wrote: > Hi, > first, I want to thank all who viewed my first question days > before, especially to those who took time to answer it. It was > trenmendous encouragement for a beginner perlee like me. Thanks again. > My question: > Is there a way to ca

Re: how to use perl modules

2005-09-27 Thread Wiggins d'Anconia
Abhishek Dave wrote: > hello all, > i've wrote a small test subroutine in my file name test.pm and in the same > directory i worte > a perl file in which i've to call this subroutine in this perl program > Capitals, punctuation, and full words are a good idea when posting to a public forum. Poor

Re: general retry function

2005-09-27 Thread Wiggins d'Anconia
Ing. Branislav Gerzo wrote: > Hi Perlers, > > I have one nice question for you, I was run into common problem: > need to repeat certain number of times something, until is succesful. > For example - download webpage, FTP upload, connect to some host and > so on. > I ask you for some general (or it

Re: Shift Question

2005-09-27 Thread Wiggins d'Anconia
Mulander wrote: > If I understood you question properly you want to know why people use > shift in subrutines and how does shift work. > > I will try to make it short: > shift works on lists, it removes the first element of the list ( the 0 > indexed element ) and returns it as a lvalue ( if there

Re: PERL's equivalent to an "include file"

2005-09-27 Thread Wiggins d'Anconia
Please bottom post... Shelly Brown wrote: > I would like to display the daily calendar information from a perl script: > http://webapps.sbuniv.edu/daycal/ within an html page so it looks like this: > http://www.sbuniv.edu/. Right now I have to manually enter the calendar > information. I would lik

Re: Camel book relevance

2005-09-25 Thread Wiggins d'Anconia
Please bottom post... Gomez, Juan wrote: > Hi ! > > I am a beginner too > > and can tell you this I use PERL a lot, I work with a lot of data and PERL > helps me to manage all the data, I have started doing some CGI programming > with it and it is great now all the text mode information I can

Re: Camel book relevance

2005-09-25 Thread Wiggins d'Anconia
Gonzillaaa wrote: > Hello, another beginner looking for a book... > > Only this time I'm pretty much decided by the "Camel book" I just wanted > to know how relevant you guys think is it for Perl today... What I mean > is how much the language has evolved since the book was last published > and if

Re: tsv

2005-09-23 Thread Wiggins d'Anconia
Matthew Sacks wrote: > Hello Folks, > > Has anybody used Data::Table? > > I am specifically interested munching some huge tab separated file. When > reading/writing it, I want to be very strict about what characters comprise > valid data. > > Suggestions? > > -matthew > Text::CVS_XS is

Re: Looking for perl scripts to remove ^M

2005-09-23 Thread Wiggins d'Anconia
Ryan Frantz wrote: > >>-Original Message- >>From: Ankur Gupta [mailto:[EMAIL PROTECTED] >>Sent: Friday, September 23, 2005 2:48 PM >>To: Dave Adams >>Cc: beginners perl >>Subject: Re: Looking for perl scripts to remove ^M >> >>On 9/23/2005 11:28 PM Dave Adams wrote: >> >> >>>Sometimes I ge

Re: RE : Is it possible to force a particular order in a hash?

2005-09-22 Thread Wiggins d'Anconia
Jose Nyimi wrote: > >>-Message d'origine- >>De : John W. Krahn [mailto:[EMAIL PROTECTED] >>Envoyé : jeudi 22 septembre 2005 23:26 >>À : Perl Beginners >>Objet : Re: Is it possible to force a particular order in a hash? >> >> >>Dave Adams wrote: >> >>>I have a hash that I need to use later

Re: trying to run net::ssh::perl have errors

2005-09-22 Thread Wiggins d'Anconia
the modules you are trying to install have a C component that must be compiled, hence the need for gcc, but that is about the extent of the issue from a Perl perspective. HTH, http://danconia.org > Thanks > > Bill > > -Original Message- > From: Wiggins d'Anconia [

Re: Reverse If and Normal Else

2005-09-22 Thread Wiggins d'Anconia
Frank Geueke, III wrote: > Hi everyone. > Okay, so maybe this one is a silly question. I have a > fairly large script and I have a bunch of places where > I'm following a reverse if with a normal else and perl > keeps complaining about it. It seems to make sense to > me, but I guess its bad synta

Re: perl script for a trace file

2005-09-21 Thread Wiggins d'Anconia
oracle s wrote: > Hello, > > I have a trace file( network simulator trace file) and I need to write a perl > script which computes drop probability and delay. The parameters are read > from the trace file and I need to do all these calculations in the perl > script. Since I have no knowledge of

Re: trying to run net::ssh::perl have errors

2005-09-21 Thread Wiggins d'Anconia
O'Brien, Bill wrote: > Greetings, > > Not sure if this is correct place, but I need to start somewhere, I have > cygwin install on my work station and I'm trying to to use > NET::SSH::Perl but I'm getting an error. > I have installed NET:SSH:Perl-1.28, but I'm getting the following error, > when I

Re: regd. cgi -apache

2005-09-19 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: > Hi perlers > > I am having IBM http server installed on my unix machine.. > But ro run cgi perl files I think we need apache. > Though http server supports apache functions. > But stillI am facing problem could u please tell me what to do > Ac

Re: Why wont this work? Package require question

2005-09-14 Thread Wiggins d'Anconia
No need to top post, please don't. Luinrandir wrote: > Ok.. and i'm actually going to top post for this... > > when done is should read > $Player{Location}="Inn"; > > require '$Player{Location}.pl'; > whixh is the same as > require 'Inn.pl'; > Same problems exist. Single quotes do NOT interpo

Re: Why wont this work? Package require question

2005-09-14 Thread Wiggins d'Anconia
Luinrandir wrote: > $Player{Location}="Inn" You are missing a semi-colon, and there is no reason to use double quotes above. > require '$Player{Location}.pl'; #no error here, I think. Single quotes don't interpolate. > '$Player{Location}'::HTML(); #error occurs here > > I'd hate to have to mak

Re: Comparing file contents (code included)

2005-09-13 Thread Wiggins d'Anconia
John W. Krahn wrote: > Wiggins d'Anconia wrote: > >>Robert wrote: >> >>>When Perl is doing this comparison is it doing it line by line (like an >>>actual DIFF) or is it putting the lines into an "array" and the checking >>>that array a

Re: Comparing file contents (code included)

2005-09-13 Thread Wiggins d'Anconia
Robert wrote: > When Perl is doing this comparison is it doing it line by line (like an > actual DIFF) or is it putting the lines into an "array" and the checking > that array against the second file? > Well yes and no, to both. It is storing the lines temporarily, but it is storing them to a hash

Re: sendmail, etc.

2005-09-09 Thread Wiggins d'Anconia
zentara wrote: > On Thu, 8 Sep 2005 19:31:11 -0700 (PDT), [EMAIL PROTECTED] > (Matthew Sacks) wrote: > > >>Greetings, >>I want to send mail from my perl code. (Boy, that's >>really unusual) >> >>I am thinking using mail::mailer. >>I need a bit more info than what I have so far found >>in the

Re: %ENV

2005-09-08 Thread Wiggins d'Anconia
Please bottom post Tony Frasketi wrote: > I've had problems with this in this the past and found your solution to > work as long as I run my script from the bash command line. > > However if the script is run from a web page, I still do not get the > value of the environment variable that I h

Re: nice low cost ISP with support for mod_perl, any suggestions

2005-09-06 Thread Wiggins d'Anconia
Adriano Ferreira wrote: > I am on the verge of trying to deploy a small web application for > small business. I would like to see it working preferably under > mod_perl. Does anyone has suggestions about possible providers with a > good compromise between service quality and cost? As it is directe

Re: Escaping with tr

2005-08-30 Thread Wiggins d'Anconia
Scott Taylor wrote: >>Hi, >> >>How can I get all the " characters out of a csv file. >> >>Input looks like >>"bla bla";"bla bla";"bla bla" >> >>and it has to look like >>bla bla;bla bla; bla bla >> >>I tried $text=~ tr(#\"##); >>but perl keeps complaining about "Might be a runaway multi-line ;;" >

Re: Escaping with tr

2005-08-30 Thread Wiggins d'Anconia
Eric Walker wrote: > On Tuesday 30 August 2005 04:16 pm, Bernard van de Koppel wrote: > >>"bla bla";"bla bla";"bla bla" > > > cat test.file | sed 's/\"//g' > editedfile Quick someone get the can of "UUoC Be Gone" ... ;-) http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

Re: encrypt the password stored in a file

2005-08-29 Thread Wiggins d'Anconia
JupiterHost.Net wrote: > > > Ken Perl wrote: > >> The password used to access a ftp server is stored in a text file, the >> perl program gets the password from the file, the pass it to the ftp >> server for logon, this is the background. >> The requirement is encrypt the password store in a more

Re: odd benchmark result, map vs foreach

2005-08-26 Thread Wiggins d'Anconia
Scott R. Godin wrote: > Wiggins d'Anconia wrote: > >> Your benchmark isn't controlled. In the first instance you are doing a >> ++ on what amounts to a scalar getting autovivified, in the second >> instance you are assigning a pair of values to a list

Re: Directories into arrays, again.

2005-08-26 Thread Wiggins d'Anconia
Daniel Kurtz wrote: > From: Daniel Kurtz [mailto:[EMAIL PROTECTED] > Why does @after end up looking exactly like @before? Is there some > > buffering going on here? And if so, how do I clear it? <<< > > Never mind, I figured it out. The file copying operation is another > shell operation (c

Re: Need a list of files in a dir.

2005-08-26 Thread Wiggins d'Anconia
Please bottom post... Daniel Kurtz wrote: > Ooh ooh ooh! One I know! > > open(COMMAND, "dir |"); > @files = ; > Sort of, while that *may* work it doesn't have proper error checking, is less secure, less efficient, and less portable than many other ways, especially those already provided. This

Re: Program is exiting on a failure

2005-08-25 Thread Wiggins d'Anconia
Chris Lyon wrote: > I seem to be erroring out @ the $session->login portion of my program > because the module that I am call is saying the password/username is > bad. How do I trap the error and exit cleanly without just dumping > from the application: > > > login failed: access denied or bad us

Re: using system to run ssh $host command

2005-08-24 Thread Wiggins d'Anconia
grover mitchell wrote: > Hi, > > I am trying to use system to run a command on a remote machine. > > system "ssh", $remote_host[0], "sudo", "-u", "nobody", > "/usr/bin/remote_command", "--arg1", $arg1, "--arg2", $arg2; > > The problem I run into is that perl will ssh into the remote host and > g

Re: odd benchmark result, map vs foreach

2005-08-24 Thread Wiggins d'Anconia
Scott R. Godin wrote: > Interesting .. I would have thought that map would be faster, but it > appears that foreach is, in this instance. curious.. :) > > > 4:52pm {193} localhost:/home/webadmin/>$ perl bench.pl > Benchmark: running Foreach, Map for at least 5 CPU seconds... >Foreach: 9 wall

Re: two way piped open

2005-08-24 Thread Wiggins d'Anconia
Bryan R Harris wrote: > > I'd like to open 2-way pipe to a tool that we have here. It's called > yprtool and once it's open, you give it 3 numbers to its STDIN and it spits > out 3 numbers to its STDOUT. It stays open until you ctrl-c it. > > What's the correct syntax for opening something like

Re: Shell output

2005-08-23 Thread Wiggins d'Anconia
Scott Taylor wrote: > Hello all, > > I have a CGI script that I need to display the output of a shell program, > basically a simple C program that parses some text. > > The output is right to the browser, and I don't want it to be creating any > new files or anything. I have a data field that ha

Re: parsing columns

2005-08-18 Thread Wiggins d'Anconia
Marcello wrote: > Manav Mathur ha scritto: > >>> Hi all, >>> I have a text file with columns, where the columns may not be aligned, >>> and not all lines may have data in all columns: >>> >>> header1 header2 header3header4 >>> ---

Re: better option then getops ??

2005-08-15 Thread Wiggins d'Anconia
John W. Krahn wrote: > Michael Gale wrote: > >>Hello, > > > Hello, > > >> I was reading online about getops and it seems that with getops the >>command line arguments have to be in the form: >> >>-character option >> >>What happens if you want your switchs to be characters like: >> >>--src_ip

Re: quantity discount calculation lookup tables

2005-08-15 Thread Wiggins d'Anconia
Scott R. Godin wrote: > I'd like to create a quantity discount table based on the following > criterion > > quantity1 - 90% > quantity10 - 1925% > quantity20 - 19940% > quantity200 - 49950% > quantity500+55% > > > I'd like to read it in via a _

Re: parsing columns

2005-08-13 Thread Wiggins d'Anconia
Offer Kaye wrote: > Hi all, > I have a text file with columns, where the columns may not be aligned, > and not all lines may have data in all columns: > > header1 header2 header3header4 > > l1dat1l1dat2l1dat3

Re: Net::DNS - Specify a Name Server

2005-08-05 Thread Wiggins d'Anconia
Ryan Frantz wrote: > Perlers, > > > > I'd like to use Net::DNS to verify that that my external name servers > are running DNS and returning the correct records. How does one specify > an alternate DNS server to use when querying? > > > > I've Googled and RTFM but can't seem to find the ans

Re: A better way.

2005-08-02 Thread Wiggins d'Anconia
Dan Klose wrote: > Hello Everyone. > > I have the following code: > > > ### CODE BLOCK ### > > my %hash_of_arrays2; > Have you considered a hash of hashes? For me, given the sample below, I would prefer it, but obviously I haven't seen your whole script. > for (keys %hash_of_arrays) { > my

Re: Some help needed in trying for my first "working" program of my own.

2005-08-01 Thread Wiggins d'Anconia
Zasinger wrote: > Hello beginners, > Welcome... > I'm a bit lost: I just installed perl yesterday and so far > it seems to have massive and appealing potential, I can > hardly belive what I am seeing. > > I'm very, very rusty in any sort of coding having been away > from it for over 15 y

Re: Want code to display date in different timezone

2005-07-29 Thread Wiggins d'Anconia
Anil Kumar, Malyala wrote: > Hi friends, > > Can you help me out. > > I have a program in which the time zone is GMT and the time is displayed > as "Thu, 28 Jul 2005 11:21:17 GMT". > > I want to display the time in IST. How can I achieve this in PERL. > > Regards, > Anil Kumar Malyala > One o

Re: Adding a library to @INC

2005-07-28 Thread Wiggins d'Anconia
Tom Allison wrote: > Wiggins d'Anconia wrote: > >> Normally you add to the @INC using the PERL5LIB environment variable. If >> "oracle>" represents a normal bash shell, then, >> >> export PERL5LIB="/path/to/lib/dir" >> >> S

Re: system v backticks

2005-07-27 Thread Wiggins d'Anconia
Keenan, Greg John (Greg)** CTR ** wrote: > Hi, > > Can someone explain the difference between backticks and system when > evaluated in this if statement: > The difference really isn't specific to this context, it is the inherent difference between the two that is affecting the outcome. perldoc -

Re: Adding a library to @INC

2005-07-27 Thread Wiggins d'Anconia
Jay Caviness wrote: > I have discovered that my Oracle installation has the DBI.pm module in > it. I really want to use this, but don't know how to have the @INC see > it when I do: > > oracle> perl -e "use DBI;" > > Can't locate DBI.pm in @INC (@INC contains: > /usr/perl5/5.6.1/lib/sun4-solaris

Re: Help: automated email forwarding similar to .forward

2005-07-27 Thread Wiggins d'Anconia
"Because it's up-side down. Why is that? It makes replies harder to read. Why not? Please don't top-post." - Sherm Pendley, Mac OS X list Rich Fernandez wrote: > Thanks for the reply, but what I need to do is hang onto the messages for an > indefinite period of time, maybe days, during which time

Re: convert array pair to hash

2005-07-20 Thread Wiggins d'Anconia
Scott R. Godin wrote: > Robert Citek wrote: > >> >> On Jul 19, 2005, at 5:19 PM, Wiggins d'Anconia wrote: >> >>> Close. You want a hash slice. >>> >>> @[EMAIL PROTECTED] = @vals; >>> >>> A marvelously Perlish construct. &

Re: convert array pair to hash

2005-07-19 Thread Wiggins d'Anconia
Robert Citek wrote: > > On Jul 19, 2005, at 5:19 PM, Wiggins d'Anconia wrote: > >> Close. You want a hash slice. >> >> @[EMAIL PROTECTED] = @vals; >> >> A marvelously Perlish construct. >> >> http://danconia.org > > > Swet!

Re: convert array pair to hash

2005-07-19 Thread Wiggins d'Anconia
Robert Citek wrote: > > Is there an easier, more compact way to convert two arrays, on with > keys and the other with values, into a hash? > > I have this sample code: > > 1 #!/usr/local/bin/perl -w > 2 > 3 my $hash ; > 4 my @keys =qw(col1 col2 col3); > 5 @vals=qw(a

Re: Problems getting current time

2005-07-19 Thread Wiggins d'Anconia
Dave Adams wrote: > I can get date but not time. > > use Time::localtime; > $tm = localtime; > printf("Current date: %04d-%02d-%02d\n",$tm->year+1900,($tm->mon)+1, > $tm->mday); > printf("Current time: %02d:%02d:%02d\n",$tm->hours,$tm->min,$tm->sec); The above should include $tm->hour instead of

Re: set environment variables

2005-07-18 Thread Wiggins d'Anconia
"Because it's up-side down. Why is that? It makes replies harder to read. Why not? Please don't top-post." - Sherm Pendley, Mac OS X list [EMAIL PROTECTED] wrote: > Hi , > Try below. > If you are using csh for executing perl script --> system("setenv > TEMPHOME /tmp "); > If your using bas

Re: How can we read files recursively?

2005-07-18 Thread Wiggins d'Anconia
Japerlh wrote: > How can we read files recursively? > > Seems like filehandler is a global variable, no matter where it was defined. > and put a openfile in a recursion function doesn't work. > > Anyone can give me any hints? > Thanks a lot. > > In newer perl's you can store a filehandle direc

Re: escaping @

2005-07-18 Thread Wiggins d'Anconia
Lawrence Statton wrote: >>On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: >> >>>Charles Farinella wrote: >>> >>>>I'm sure this is very simple and I am overlooking something. I want to >>>>read a list of bad email addresses f

Re: Download and post in web page pdf file(s)

2005-07-18 Thread Wiggins d'Anconia
Roberts Mr Richard L wrote: > Hi, > Does anyone know how/where I can resolve scp pdf files (user selected) and > display in a web page? > thanks > -r > I suspect the reason this post hasn't gotten more response is because it is incredibly unclear. What do you mean by "how/where" or "resolve" or "

Re: escaping @

2005-07-18 Thread Wiggins d'Anconia
Charles Farinella wrote: > On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: > >>Charles Farinella wrote: >> >>>I'm sure this is very simple and I am overlooking something. I want to >>>read a list of bad email addresses from a file and remove

  1   2   3   4   5   6   7   8   9   10   >