Form mail with preview?

2002-11-04 Thread Phil Solomon
Hi there, I was wondering whether anyone could point me in the direction of a formmail script that has an option to preview before posting the form data. The preview would be a web page showing the data without the form fields so it can be printed out. Much thanx in advance Phil S -- To

RE: Form-mail blues

2002-11-04 Thread Scot Robnett
You should really separate the header printing process from the HTML printing process. The first thing you want to do is tell the browser that HTML is coming, -then- write the HTML. A couple different ways of accomplishing this: use CGI; $q = new CGI; print $q-header; or print

RE: Translators

2002-11-04 Thread Peter Kappus
Are we talking programming languages like C to Perl? Or spoken languages like Spanish to Italian? if you're talking about localization I know there are lots of modules and tools to help you out... you might look here: http://cpan.org/modules/by-category/13_Internationalization_Locale/Locale/

RE: How to check server for perl setup?

2002-11-04 Thread Peter Kappus
I tend to agree with zentara...Are you able to run simple perl scripts from the command line? If so then your perl install is okay... Can you run simple CGI scripts? When i first start using a new server I always run a quick: #!/usr/bin/perl print Content-type: text/html\n\n; print Howdy

RE: hard coded

2002-11-04 Thread David Samuelsson (PAC)
looks to me like you are trying to read the voblist from clearcase? or is it the labels that is in that VOB? why have you placed them in a text file? why not read em out from the system directly? if you want to read the label names you can just run it like this my $vob = vobname @labels =

PDF to PS

2002-11-04 Thread Jean Padilla
Hi, all Do someone knows about a perl module to convert PDF files to postscript ? I'm working on several UNIX (AIX) boxes and want to 'automagically' print PDF files. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: hard coded

2002-11-04 Thread Javeed SAR
No I have kept the vob names? I don't need all the vobs. i.e the reason i am reading from file. Regards j@veed -Original Message- From: David Samuelsson (PAC) [mailto:David.Samuelsson;pac.ericsson.se] Sent: Monday, November 04, 2002 1:29 PM To: Javeed SAR; [EMAIL PROTECTED] Subject:

The basics of SWITCH

2002-11-04 Thread Gajo Csaba
Hi, I have a problem with SWITCH. I wrote this, I think it's clear to anzone what it should do: print Type in a number 1-5: ; $s = STDIN; SWITCH; { if ($s == 1) { print one\n; last SWITCH; } if ($s == 2) { print two\n; last SWITCH; } if ($s == 3) { print three\n; last SWITCH; } if ($s == 4)

RE: The basics of SWITCH

2002-11-04 Thread David Samuelsson (PAC)
if i am going to do something like this i would have done: use strict; my ($answer); #create menu print \n\n\t\t\tinstall menu\n\n; print \t\t\tChoose one of the following options..\n; print \t\t\t1. Install/reinstall xxx.\n; print \t\t\t2. Install/reinstall xxx.\n; print \t\t\t3. Uninstal

RE: The basics of SWITCH

2002-11-04 Thread Bob Showalter
-Original Message- From: Gajo Csaba [mailto:[EMAIL PROTECTED]] Sent: Monday, November 04, 2002 9:18 AM To: perl-beginners Subject: The basics of SWITCH Hi, I have a problem with SWITCH. I wrote this, I think it's clear to anzone what it should do: print Type in a number 1-5:

Re: The basics of SWITCH

2002-11-04 Thread Jean Padilla
Hi, when you get $s from STDIN, it comes along with a newline, so try something like: chomp($s = STDIN); A+ Gajo Csaba a écrit : Hi, I have a problem with SWITCH. I wrote this, I think it's clear to anzone what it should do: print Type in a number 1-5: ; $s = STDIN; SWITCH; { if ($s

RE: hi,everyone,help me

2002-11-04 Thread Bob Showalter
-Original Message- From: alex chen [mailto:cg;gddc.com.cn] Sent: Sunday, November 03, 2002 6:05 AM To: [EMAIL PROTECTED] Subject: hi,everyone,help me hi,all! today,i have write such a program #!usr/local/bin/perl5.6.1 #middle machine version 1.0 use IO::Socket;

RE: The basics of SWITCH

2002-11-04 Thread Bob Showalter
-Original Message- From: Jean Padilla [mailto:jean.padilla;ac-montpellier.fr] Sent: Monday, November 04, 2002 9:41 AM To: Gajo Csaba Cc: perl-beginners Subject: Re: The basics of SWITCH Hi, when you get $s from STDIN, it comes along with a newline, so try something like:

Variable names

2002-11-04 Thread Brian Ling
Hi all Is it possible to use the string value of a variable to create a new hash i.e. My $name = fred; Can I use $name to create a hash called fred? Thanks Brian BBCi at http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not

Re: The basics of SWITCH

2002-11-04 Thread Jim Thomason
Try this: SWITCH: { $s == 1 do {print one\n; last SWITCH;}; $s == 2 do {print two\n; last SWITCH;}; $s == 3 do {print three\n; last SWITCH;}; $s == 4 do {print four\n; last SWITCH;}; $s == 5 do {print five\n; last SWITCH;}; print No match found.\n; } You need a colon, not a semicolon,

Re: The basics of SWITCH

2002-11-04 Thread Robert Citek
Hello Gajo, A different approach to your problem is to use a data structure, e.g. an array or hash. Your script rewritten using an array, #!/usr/bin/perl -w my @option = (one,two,three,four,five,six,maybe seven?); print Type in a number 1-, $#option+1, : ; $s = STDIN; chomp $s ; if ( $s =~

Re: Variable names

2002-11-04 Thread Jenda Krynicky
From: Brian Ling [EMAIL PROTECTED] Is it possible to use the string value of a variable to create a new hash i.e. My $name = fred; Can I use $name to create a hash called fred? This is really a FAQ :-( Yes you can, but you don't want to. Please read Why it's stupid to `use a

RE: Variable names

2002-11-04 Thread NYIMI Jose (BMB)
-Original Message- From: Brian Ling [mailto:brian.ling;bbc.co.uk] Sent: Monday, November 04, 2002 4:17 PM To: [EMAIL PROTECTED] Subject: Variable names Hi all Is it possible to use the string value of a variable to create a new hash i.e. My $name = fred; Can I use

Re: The basics of SWITCH

2002-11-04 Thread K Pfeiffer
Gajo Csaba writes: Hi, I have a problem with SWITCH. I wrote this, I think it's clear to anzone what it should do: Just out of curiousity I typed in 'perldoc SWITCH' and 'perldoc -f SWITCH' and found nothing. What is it? (the short answer is fine) Thanks, Kevin -- Kevin Pfeiffer

Split a file

2002-11-04 Thread Johnny Hall
Hello all, I am trying to take a file of variable length on a daily basis and divide it up into 4 equal parts for processing on each file. Does someone have an easy way to do this? The original file is just a series of numbers like.. 3233404936 3233404934 3233669122 3233557761 3233818369

Data storage problem

2002-11-04 Thread Brian Ling
Hi All I have a foreach (array) loop that is reading data in from config files and saving the parts I want into a hash, the value of the hash is overwritten by each pass through the loop, for some of the passes round the loop I need to save the contents of the hash ideally into an array of

RE: Perl x RedHat 8.0 x Apache 2.0.40

2002-11-04 Thread Bob Showalter
-Original Message- From: Josimar Nunes de Oliveira [mailto:jn_oliveira;estadao.com.br] Sent: Monday, November 04, 2002 11:31 AM To: [EMAIL PROTECTED] Subject: Perl x RedHat 8.0 x Apache 2.0.40 Hello everybody, Please, does someone know how to fix this problem? The server is

RE: Split a file

2002-11-04 Thread Timothy Johnson
One way would be to print each line to a different file and loop through the input file: open(INFILE,my.log) || die Couldn't open my.log!\n; open(FILE1,file1) || die Couldn't open file1!\n; open(FILE2,file2) || die Couldn't open file2!\n; open(FILE3,file3) || die Couldn't open file3!\n;

V Unpretty code

2002-11-04 Thread Patrick Salmon
There's always another way to do it, right? I have a piece of code that does repeated searches through an input string and modifies it according to certain criteria. What I have works great, but I'd like to know how to write it better/more efficiently. Given that I'm going over the same

Re: V Unpretty code

2002-11-04 Thread Peter Scott
In article 00e201c28426$051681e0$[EMAIL PROTECTED], [EMAIL PROTECTED] (Patrick Salmon) writes: I have a piece of code that does repeated searches through an input = string and modifies it according to certain criteria. What I have works = great, but I'd like to know how to write it better/more

Re: The basics of SWITCH

2002-11-04 Thread Jeff 'japhy' Pinyan
On Nov 4, K Pfeiffer said: Gajo Csaba writes: Hi, I have a problem with SWITCH. I wrote this, I think it's clear to anzone what it should do: Just out of curiousity I typed in 'perldoc SWITCH' and 'perldoc -f SWITCH' and found nothing. What is it? (the short answer is fine) It is nothing. A

Re: Data storage problem

2002-11-04 Thread Jeff 'japhy' Pinyan
On Nov 4, Brian Ling said: If I, push @save_array, \%hash_data I obviously get a array referencing the same mem address for each loop, the value of which gets overwritten next time round. Then you need to scope your hash. When you declare the hash, use my: for (...) { my %hash =

Re: V Unpretty code

2002-11-04 Thread Patrick Salmon
Yes, there's a DFILE for the last entry. Mis-edit on my partkinda left it hanging, didn't I? All the output goes to the same file. Thanks for the suggestion. I'll play some and see how it goes. Thanks again. Pat - Original Message - From: Peter Scott [EMAIL PROTECTED] To: [EMAIL

Re: Calculate PI

2002-11-04 Thread Ovid
--- Sven Bentlage [EMAIL PROTECTED] wrote: Hi everyone! I am trying to write a program calculating pi. The formula I would like to use is pi = 4x( (1/1) - (1/3) + (1/5) - (1/7) + (1/9) - (1/11) ) or $pi = 4x ( (1/$y) - ) Hi Sven, The Leibniz series is

Connecting to a drive

2002-11-04 Thread Larry Sandwick
Hello, I am trying to write a Perl script that will replicate a directory on one computer to another. All of the computers are running XP. I do have administrative privileges. The problem is when I run the line below I never get connected to the computer from within the scripted.

RE: Connecting to a drive

2002-11-04 Thread Nikola Janceski
remember what \ does in these try: system net use m: $nodec\\$ file:///$node\\c\\$ user:/username password; remember for one \ you need \\ for 2 \ you need -Original Message- From: Larry Sandwick [mailto:lgs;sarreid.com] Sent: Monday, November 04, 2002 3:31 PM

Re: Connecting to a drive

2002-11-04 Thread Jenda Krynicky
From: Larry Sandwick [EMAIL PROTECTED] I am trying to write a Perl script that will replicate a directory on one computer to another. All of the computers are running XP. I do have administrative privileges. The problem is when I run the line below I never get connected to the computer from

RE: Connecting to a drive

2002-11-04 Thread Larry Sandwick
Thanks for the quick response, using the print command I saw the error of my way !!! I had a space in $node. Thanks again for the help !!! ---Larry -Original Message- From: Jenda Krynicky [mailto:Jenda;Krynicky.cz] Sent: Monday, November 04, 2002 3:41 PM To: [EMAIL PROTECTED]

Re: V Unpretty code

2002-11-04 Thread John W. Krahn
Patrick Salmon wrote: There's always another way to do it, right? I have a piece of code that does repeated searches through an input string and modifies it according to certain criteria. What I have works great, but I'd like to know how to write it better/more efficiently. Given that

Re: changing case

2002-11-04 Thread dan
try this.. __ START __ my $path = qq~$HOME/documents~; # set this to your path opendir(DIR,$path) or diesub(can't readdir $path: $!); # open the entire directory for getting the contents of while (my $file = readdir DIR) { # $file gets assigned the next value of DIR, and exits when there's no

Reading from mulitple files

2002-11-04 Thread Kevin Old
Hello all, I know this has been asked a few times over the years, but I can't find an answer that is what I need in the archives. I have 2 files. I have a for loop. I need to read from both files with 1 file handle, or whatever will allow my code to read from both files alternating between

Re: Reading from mulitple files

2002-11-04 Thread Ovid
--- Kevin Old [EMAIL PROTECTED] wrote: Hello all, I know this has been asked a few times over the years, but I can't find an answer that is what I need in the archives. I have 2 files. I have a for loop. I need to read from both files with 1 file handle, or whatever will allow my code to

Calling a win32 script from within perl fetching the output

2002-11-04 Thread Voodoo Raja
Hi all I will be glad if you can help me.. all I need is to execute a win32 script on a workstation on a LAN and fetch the output using perl my current set of resources includes : a win32 exe : a main.pl I em able to this very same thing on a local machine . ie I can get the output after

checking input syntax

2002-11-04 Thread Jose Malacara
I would like to be able to verify the presence and syntax of an argument coming into my script prior to actually doing anything with it. My script is execpting to see something like this ../myscript server10.boston or ../myscript server30.california I am able to check for the presense of an

Re: Reading from mulitple files

2002-11-04 Thread John W. Krahn
Kevin Old wrote: Hello all, I know this has been asked a few times over the years, but I can't find an answer that is what I need in the archives. I have 2 files. I have a for loop. I need to read from both files with 1 file handle, or whatever will allow my code to read from both

Help with Hash values and variable interpolation

2002-11-04 Thread Scott, Joshua
Hello all, I've got a file which contains ports and hostnames. I'd like to count the number of instances that each item occurs in my file. I'm having a difficult time with this. This is my script: Basically I'm splitting the first line a few times to get the data I need. What am I doing

RE: Help with Hash values and variable interpolation

2002-11-04 Thread Scott, Joshua
I figured it out already! I ran a replace on the dst_port and replaced it with a whitespace which threw off the count. I've modified it to delete the whitespace and all works perfect. Joshua Scott Security Systems Analyst, CISSP 626-568-7024 -Original Message- From: Scott, Joshua

Re: Help with Hash values and variable interpolation

2002-11-04 Thread John W. Krahn
Joshua Scott wrote: Hello all, Hello, I've got a file which contains ports and hostnames. I'd like to count the number of instances that each item occurs in my file. I'm having a difficult time with this. This is my script: Basically I'm splitting the first line a few times to get