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 value.

Re: how to send a page and a file at a download script?

2008-09-23 Thread Wiggins d'Anconia
shnaxe wrote: dear readers, i recently finished a small perl-cgi download script that sends files after some checks and logging. i call this script through a link on a static html-page and pass the file-id as a parameter. this all works nice so far, the part where i'm stuck at is that

Re: parsing a line

2008-08-19 Thread Wiggins d'Anconia
thunder wrote: Hello all I have the following small file that i am parsing one line at a time (each line consists of hex values) line 1: 0d line 2: line 3: 2000 line 4: 0064 line 5: 76d457ed462df78c7cfde9f9e33724c6 line 6: bded7a7b9f6d763e line 7: 0059010081bb300597603b6f90ef4421

Re: Extracting TD's from a Text File (Regex Help).

2008-04-08 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: TEXT FILE ## td class=PhorumTableRowAlt thread style=padding-left: 0px a href=http://mysite.com/link/here_goes?id=239;LINK/a nbsp;span class=PhorumNewFlag/span/td td class=PhorumTableRowAlt nowrap=nowrap

Re: Adding a comma to format localtime

2007-04-09 Thread Wiggins d'Anconia
Gregg O'Donnell wrote: All, I use this line of code: my $datetime = join ' ', (split ' ', localtime)[0,2,1,4,3]; my $localtime = [ split ' ', localtime ]; my $datetime = $localtime-[0] . ', ' . join ' ', @$localtime[2,1,4,3]; TMTOWTDI... http://danconia.org To create this result:

Re: Tweeking a sendmail routine.

2007-03-25 Thread Wiggins d'Anconia
Greg Schiedler wrote: I know enough Perl to be dangerous! I have a form that sends out several different confirmations depending on who the receipient is. One particular E-mail I need to be in html format so I can put it into a specific format. I added a couple of lines to the sendmail

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

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 =~

Re: -e question

2006-12-15 Thread Wiggins d'Anconia
Lou Hernsen wrote: I use the -e to check to see if a file is present if (-e $Pics/$Game{Page}.jpg) { } Question I can get it to work looking for .pl and .gif but not .jpg I have checked all the directorie vars and even did this print qq|img border=0 src=$Pics/Camera.gif

Re: trouble with meta http-equiv

2006-11-30 Thread Wiggins d'Anconia
David Bear wrote: I'm trying to put a client side redirect with http-equiv refresh. I'm using the syntax: my $req = CGI-new(); print $req-header( text/html ); print $req-start_html( -head=meta({-http-equiv = 'refresh', In the above line the call to meta() is a function call, but you have

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;# OBperl:

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 logs

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:

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 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: Help With signals.

2006-01-06 Thread Wiggins d'Anconia
} = \sigcat; $name can't 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: Leif

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 there a

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 about above

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 get an error.

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 symlink

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 not have

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 be

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

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: 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 strict;

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

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_parameter) in order

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 warnings; use strict;

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 perltooc And issuing, perldoc perl Thanks

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 and

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 memory manager of your OS can decide to swap stale stuff from

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 known as the

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 content *My

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 next

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 should return nothing

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 would

Re: Taking Multiple Values for The Same Form Field.

2005-10-29 Thread Wiggins d'Anconia
Bob O'Neill wrote: Use list context: my @names = $q-param('name'); Cheers, Ovid I've found this thread very helpful, and have changed it to use Vars (from http://users.easystreet.com/ovid/cgi_course/) as I need a hash. This has replaced the following: foreach $entry (param()) {

Re: hardcoded paths

2005-10-28 Thread Wiggins d'Anconia
Dermot Paikkos wrote: Hi, I am moving a site from once host to another. There are lots of hardcoded fully qualified paths to the localhost (EG http://myserver/cgi-bin/someprog.pl?name=val http://myserver/css/mystyle.css). I am pretty sure this isn't good practise but I am not a bit

Re: CGI Upload() for nonexistent files?

2005-10-28 Thread Wiggins d'Anconia
Joby Jones wrote: Hello all, I have a question about the CGI upload() function. Why does it return a valid file handle to a file that does not exist on the client (web browser) machine, and what's the best way to handle this? Presumably because this is really a client

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 $mysql_dbh =

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 module lives in $ENV{HOME}/modules/DBI/DBI.pm. Is that the case? Or should

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 the

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: 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] http://learn.perl.org/

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 file using perl program... Thanks Hridyesh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

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 program)? I

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 provide a

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 problem

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? Daniel

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 PROTECTED]

Re: $CGI::DISABLE_UPLOADS

2005-10-18 Thread Wiggins d'Anconia
Bill Stephenson wrote: I've been testing the $CGI::DISABLE_UPLOADS and $CGI::POST_MAX variables and I don't think I've got it feature working as it should. The docs say this: CGI.pm also has some simple built-in protections against denial of service attacks, but you must activate

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 command,

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; perldoc -f sprintf

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' comes into use?

Re: Query on sendmail problem

2005-10-05 Thread Wiggins d'Anconia
Dale wrote: Hi, I'm hoping someone can help me with an issue I've got with, I assume, sendmail. I've copied part of a script below. If I use the first To: line (which takes the e-mail address from a file - and this works) then a mail doesn't arrive. If, however, I used the second To:

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 call or

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 like

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 are

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 can't

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: Camel book relevance

2005-09-26 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 that

Re: Camel book relevance

2005-09-26 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 put

Re: html file with form and onSubmit=return check_form(this)

2005-09-23 Thread Wiggins d'Anconia
Edgardo Lust wrote: Hi. I have a html file (created with Dreamweaver) with one form and submit button with form method=POST action=/cgi-bin/contact.pl onSubmit=return check_form(this) input type=hidden name=success value=/contacto/message.htm input

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 also

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 syntax.

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

2005-09-22 Thread Wiggins d'Anconia
, 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 [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 21, 2005 5:32 PM To: O'Brien, Bill Cc: beginners

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 and display some

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 run

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: Forcing a save as' dialogue box to come up on left click

2005-09-19 Thread Wiggins d'Anconia
Tony Frasketi wrote: Wiggins d'Anconia wrote: Most browsers will provide this functionality if the return header is application/octet-stream rather than text/html or the like. In the case of IE you may have to fool the browser into thinking it is getting something different than

Re: Forcing a save as' dialogue box to come up on left click

2005-09-19 Thread Wiggins d'Anconia
Tony Frasketi wrote: What I was intending was to call the cgi script and rather than it printing the normal text/html header it would print the header directly, that way you are guaranteed to be operating the way you intended. Hi Wiggins Thanks for this suggestion... I've tried the

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

Re: Forcing a save as' dialogue box to come up on left click

2005-09-18 Thread Wiggins d'Anconia
Tony Frasketi wrote: Hello Listers I'm trying to find a way to force a download dialogue box to come up when the user clicks on a link on a web page (the link will primarily be for htm, .txt files on the server). Normally when the user left clikcs on the link the .htm or .txt file appears in

Re: problems with CGI.pm upload feature

2005-09-17 Thread Wiggins d'Anconia
Bill Stephenson wrote: On Sep 16, 2005, at 7:51 PM, Scott R. Godin wrote: Wiggins d'Anconia wrote: Scott R. Godin wrote: script is at http://phpfi.com/78748 I followed the instructions in CGI.pm as best I could, and from what I read the upload() function is supposed to return

Re: problems with CGI.pm upload feature

2005-09-16 Thread Wiggins d'Anconia
Scott R. Godin wrote: script is at http://phpfi.com/78748 I followed the instructions in CGI.pm as best I could, and from what I read the upload() function is supposed to return a filehandle ? (it doesn't say whether this is a direct FH to the tempfile or not) I had dome some preliminary

Re: File Modification Date

2005-09-14 Thread Wiggins d'Anconia
Vance M. Allen wrote: I'm trying to find out how to determine the date and/or time that a file was created in a simple procedure. I have heard about a few different libraries but the examples I have found haven't been very useful. The basic purpose I want to do is a simple footer provided

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 make a

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 interpolate,

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, not

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 against the second file? Well yes and no, to both. It is storing the lines

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 online

Re: Exact matching using GREP.

2005-09-08 Thread Wiggins d'Anconia
Please bottom post Sara wrote: No, it's not working, probably you didnt' get my question. How is it not working now? What Ovid sent is exactly what I would have answered so you probably need to provide more information. You mention man pages and switches to grep, there are two greps here,

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 had

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 directed

Re: Force a file download for link

2005-08-30 Thread Wiggins d'Anconia
Denzil Kruse wrote: --- Bob Showalter [EMAIL PROTECTED] wrote: snip use CGI qw(:standard); open FILE, ...blah blah... print header('application/octet-stream'); print while FILE; Thanks for the help Bob! Is there another way besides the content-disposition to specify an

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 additional

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 ;; On a more serious note. Simply

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 secure

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 = COMMAND; 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: 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'mon, I'm a

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 then autovivifying it. It isn't necessarily the map

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 username

Re: $ENV{'HTTP_REFERER'}

2005-08-24 Thread Wiggins d'Anconia
Denzil Kruse wrote: Hi, I want to know the web site that someone came from, and so I was planning on reading $ENV{'HTTP_REFERER'} to figure it out. How reliable is that? Do browsers or other situations block it or obfuscate it? Is there another way to do it or any other issues

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: 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 wallclock

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 give me a shell there,

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 has a

  1   2   3   4   5   6   7   8   9   10   >