Re: PLaying with CGI's

2001-07-09 Thread Richard
Hi Nathan > Roger G. Romeril replied to an email about test sites for cgi scripts. He > mentioned that instead, it would be better to get a stripped down pc and > load Linux, perl, and apache and play with that. Well, I decided to do just > that. While the suggestion wasn't specifically aimed

Re[2]: SMTP - outgoing email

2001-07-09 Thread Tim Musson
Hey Michael, Monday, July 09, 2001, 7:35:04 PM, my MUA believes you used (X-Mailer not set) to write: >> There are many ways to do this. I usually use Net::SMTP, but there >> is also Net::Mailer (which I believe runs Net::SMTP for you), and >> Net::Sendmail (and I think this runs Net::Mailer?).

Re: SMTP - outgoing email

2001-07-09 Thread Michael Fowler
On Mon, Jul 09, 2001 at 07:09:36PM -0400, Tim Musson wrote: > There are many ways to do this. I usually use Net::SMTP, but there is > also Net::Mailer (which I believe runs Net::SMTP for you), and > Net::Sendmail (and I think this runs Net::Mailer?). These should be Mail::Sendmail and Mail::Maile

Re: timer/display-DISPLAY WORKING;THANKS

2001-07-09 Thread Jeff 'japhy' Pinyan
On Jul 9, [EMAIL PROTECTED] said: >I don't fully understand why yet; that select(undefPAUSE) thing eludes >me, but I'll hit the books tonight. > select(undef, undef, undef, PAUSE); The docs for 4-arg select() have an example which you should take a look at. 4-arg select() is used for

RE: timer/display-DISPLAY WORKING;THANKS

2001-07-09 Thread Wagner-David
In this case you are just using the select for the time out and not concerned about the other actions of select. Wags ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 09, 2001 16:27 To: [EMAIL PROTECTED] Subject: Re: timer/display-DISPLA

RE: Re[2]: Net::ftp

2001-07-09 Thread Wagner-David
It is part of libnet and usually installed as part of core Perl install. Wags ;) -Original Message- From: Tim Musson [mailto:[EMAIL PROTECTED]] Sent: Monday, July 09, 2001 16:09 To: [EMAIL PROTECTED] Subject: Re[2]: Net::ftp Hey Jorge, Monday, July 09, 2001, 5:36:33 AM, my MUA

Re: timer/display-DISPLAY WORKING;THANKS

2001-07-09 Thread GoodleafJ
I don't fully understand why yet; that select(undefPAUSE) thing eludes me, but I'll hit the books tonight. -John Jeff 'japhy'

Re: SMTP - outgoing email

2001-07-09 Thread Tim Musson
Hey Stewart, There are many ways to do this. I usually use Net::SMTP, but there is also Net::Mailer (which I believe runs Net::SMTP for you), and Net::Sendmail (and I think this runs Net::Mailer?). I think you are missing the "datasend" To: & From: in your smtptest.pl Here is the Net::SMTP temp

Re[2]: Net::ftp

2001-07-09 Thread Tim Musson
Hey Jorge, Monday, July 09, 2001, 5:36:33 AM, my MUA believes you used dtmail 1.3.0 @(#)CDE Version 1.4.2 SunOS 5.8 sun4u sparc to write: JG> Hi How I can install Net::ftp I try with ppm but I didn't find it JG> when I type search,I am under windows 98 and I wanted to install JG> a ftp client.

RE: newbie whitespace question

2001-07-09 Thread Wagner-David
Change:if ( /^Kilobytes:(.*)$/ ) to if ( /^Kilobytes:\s*(\d*)$/ ) where $1 will have your count without leading spaces. You may want a test to verify that you did get a hit on digits. Wags ;) -Original Message- From: Nat Durbin [mailto:[EMAIL PROTECTED]] Sent: Monday, July 09

newbie whitespace question

2001-07-09 Thread Nat Durbin
Hi, I have a newbie whitespace question. Say I have a regular variable that has a string in it with something like " text". I just want to reassign the variable to the text inside the double quotes above. or, given the snippet... my $var=""; while ( ) { if ( /^Kilobytes:(.*)$/ ) {

Re: web page listing directory contents

2001-07-09 Thread charles
I think someone on the list said it best when they wrote "what have you got so far and lets build from there." On Mon, 9 Jul 2001, Tito Perez wrote: > Hi all, I want to write a script that generates a web > page based on the contents of a directory. > What is a simple way to iterate through th

Re: web page listing directory contents

2001-07-09 Thread Jeff 'japhy' Pinyan
On Jul 9, Tito Perez said: >What is a simple way to iterate through the filenames >of a directory? The opendir(), readdir(), and closedir() functions. my $path = "/home/jeffp/pub_html/tmp"; opendir DIR, $path or die "can't readdir $path: $!"; while (defined (my $file = readdir DIR)) {

Re: Do not know how to classify it....

2001-07-09 Thread Jeff 'japhy' Pinyan
On Jul 9, Craig S Monroe said: >I have split a string successfully into two variables. No big feat. The >problem I am having is that the string I have set the script to look for >occurs twice. So I encounter the string. split is as necessary, and >assign the variables. It then encounters the stri

web page listing directory contents

2001-07-09 Thread Tito Perez
Hi all, I want to write a script that generates a web page based on the contents of a directory. What is a simple way to iterate through the filenames of a directory? __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://persona

Do not know how to classify it....

2001-07-09 Thread Craig S Monroe
I have split a string successfully into two variables. No big feat. The problem I am having is that the string I have set the script to look for occurs twice. So I encounter the string. split is as necessary, and assign the variables. It then encounters the string and does the above again. What I

Re: timer/display

2001-07-09 Thread Chas Owens
On 09 Jul 2001 17:39:15 -0400, Chas Owens wrote: > On 09 Jul 2001 14:03:47 -0700, [EMAIL PROTECTED] wrote: > > This will sound silly. > > > > I need to come up with a simple status indicator of some sort. I have in > > mind a "spinner." You've seen them before I'm sure, where there's a '-' > > th

Re: timer/display

2001-07-09 Thread Chas Owens
On 09 Jul 2001 14:03:47 -0700, [EMAIL PROTECTED] wrote: > This will sound silly. > > I need to come up with a simple status indicator of some sort. I have in > mind a "spinner." You've seen them before I'm sure, where there's a '-' > then it changes to '\' then '|' then '/' then '-' and so forth,

Re: timer/display

2001-07-09 Thread Christian Campbell
[EMAIL PROTECTED] wrote: > I need to come up with a simple status indicator of some sort. I have in > mind a "spinner." You've seen them before I'm sure, where there's a '-' > then it changes to '\' then '|' then '/' then '-' and so forth, so that it [...] Check this thread:

Re: timer/display

2001-07-09 Thread Jeff 'japhy' Pinyan
On Jul 9, [EMAIL PROTECTED] said: >I need to come up with a simple status indicator of some sort. I have in >mind a "spinner." You've seen them before I'm sure, where there's a '-' >then it changes to '\' then '|' then '/' then '-' and so forth, so that it >appears to be spinning. Actually, I rea

timer/display

2001-07-09 Thread GoodleafJ
This will sound silly. I need to come up with a simple status indicator of some sort. I have in mind a "spinner." You've seen them before I'm sure, where there's a '-' then it changes to '\' then '|' then '/' then '-' and so forth, so that it appears to be spinning. Actually, I really don't care

Re: command line flags

2001-07-09 Thread Michael Fowler
On Mon, Jul 09, 2001 at 03:22:59PM -0500, saliminl wrote: > The problem is, I have no clue what is on these systems (modules) and I > have no permissions to install outside of my home directory. I'm a lowly > terminal boy :-( but this program will be used network wide, so maybe I > should talk t

RE: command line flags

2001-07-09 Thread Jeff 'japhy' Pinyan
On Jul 9, saliminl said: >The problem is, I have no clue what is on these systems (modules) and I have >no permissions to install outside of my home directory. I'm a lowly terminal >boy :-( but this program will be used network wide, so maybe I should talk to >the Network Admin. Of course, I

RE: command line flags

2001-07-09 Thread saliminl
The problem is, I have no clue what is on these systems (modules) and I have no permissions to install outside of my home directory. I'm a lowly terminal boy :-( but this program will be used network wide, so maybe I should talk to the Network Admin. Of course, I can do anything I want on my

Re: command line flags

2001-07-09 Thread Jos I. Boumans
you can use the Getopt::std module for that it allows you to use flags like you know from your *nix system it will store them in either a hashref or simple scalars, so it's quite nifty perldoc getopt::std for more info hth Jos Boumans - Original Message - From: "saliminl" <[EMAIL PROTE

Re: command line flags

2001-07-09 Thread Tyler Longren
Example: use Getopt::Std; getopts("dwmy", \%options); # If no command line option is specified print the usage. if (!defined $options{d} && !defined $options{w} && !defined $options{m} && !de$ print " Usage: log.pl < -d -w -m -y > -d : generate log for last 24 hours -w

command line flags

2001-07-09 Thread saliminl
How do I take, for example, a file input name and command line flags when opening a perl script? My desired input style is: % eproc -n FILENAME -m -d etc. I need to make everything a scalar. Thanks Neema Salimi [EMAIL PROTECTED]

[OT]Re: "the right way"

2001-07-09 Thread Paul
--- dave hoover <[EMAIL PROTECTED]> wrote: > Paul wrote: > > On Mon, Jul 09, 2001 at 09:44:57AM -0700, dave > > hoover wrote: > > > I think it's a matter of style, but also one > > > should consider who will be maintaining this code in the > > > future and whether they will be familiar with Perl

Trying to print output on NT but in Unix form (LF only)

2001-07-09 Thread Cindi . Lund
I do the following statement but the output still gets a CR/LF pair: print OUTPUT "this is a test".chr(10) Interesting, though, if I do the same statement with chr(13) for CR only, it does CR only - of course that's not what I need. Oh well. Also tried setting $\ to chr(10) - no help. Looki

Re: Simple

2001-07-09 Thread Bill Pierson
Thanks! In just a moment you'll hear a loud "pop." That will be the sound of my head coming out of my buttocks with great force. :) --Bill - Original Message - From: "Ledbetter, Jason" <[EMAIL PROTECTED]> To: "'Bill Pierson '" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, Jul

RE: Simple

2001-07-09 Thread Ledbetter, Jason
open(IN,"something.txt"); while($line = ) { chomp($line); if ($line eq "something") { ## HOW DO I STOP THE WHILE AND MOVE ON? last; ##Here's how. :) } }

Passing Arguments to Perl Script

2001-07-09 Thread Mike Truong
Hi, How to pass arguments to a (method=post) CGI script and how to access them? Please give an example. Thanks in advance.

RE: Simple

2001-07-09 Thread Wagner-David
last; This will move you out of the while loop. Wags ;) -Original Message- From: Bill Pierson [mailto:[EMAIL PROTECTED]] Sent: Monday, July 09, 2001 11:20 To: [EMAIL PROTECTED] Subject: Simple Easy question. open(IN,"something.txt"); while($line = ) { chomp($line);

Simple

2001-07-09 Thread Bill Pierson
Easy question. open(IN,"something.txt"); while($line = ) { chomp($line); if ($line eq "something") { ## HOW DO I STOP THE WHILE AND MOVE ON? } } Too little sleep + too much perl = deer in headlights. Any help will be appreciated, --Bill

Re: "the right way"

2001-07-09 Thread dave hoover
Paul wrote: > On Mon, Jul 09, 2001 at 09:44:57AM -0700, dave > hoover wrote: > > > I think it's a matter of style, but also one > should > > consider who will be maintaining this code in the > > future and whether they will be familiar with Perl > or > > if they will have a more general CS backgr

RE: RegExp problem

2001-07-09 Thread saliminl
Thanks a ton! I've been working with "Perl, A Beginner's Guide" for a few days now and referencing the Camel. These scripts will definitely aid me greatly on the UNIX systems on which I do computational chemistry. Neema Salimi [EMAIL PROTECTED] >= Original Message From [EMAIL PROTECTED]

perl / php question

2001-07-09 Thread Bob Mangold
Hello, I'm not sure if anyone here can help me with this, but at least some direction in where to to look would be great. I'm using a php script so call (via exec) a perl script. The STDOUT from perl is automatically forwarded through the php script and displayed on the web page. My problem howe

Re: Some help with a script

2001-07-09 Thread Jeff 'japhy' Pinyan
On Jul 9, Tom Yarrish said: >I do have one additional question with the suggestion for the @days array. >How does this affect the month. Localtime returns the month-1, so I would >have to adjust for that during the month, and then leave it alone at the >end of the month. Or was this a suggestio

Re: "the right way"

2001-07-09 Thread Paul Johnson
On Mon, Jul 09, 2001 at 09:44:57AM -0700, dave hoover wrote: > I think it's a matter of style, but also one should > consider who will be maintaining this code in the > future and whether they will be familiar with Perl or > if they will have a more general CS background. You know, I've never li

Re: Some help with a script

2001-07-09 Thread Tom Yarrish
I do have one additional question with the suggestion for the @days array. How does this affect the month. Localtime returns the month-1, so I would have to adjust for that during the month, and then leave it alone at the end of the month. Or was this a suggestion to replace the if/else part? T

Re: Big-endian/little-endian

2001-07-09 Thread Jeff 'japhy' Pinyan
On Jul 9, Derrick Jamison said: >I am working on a script to move some data between databases and ran into a >problem. Basically I need to convert a field from big-endian to >little-endian before I move the data. I have been doing some digging trying >to see if there is a function available for

Re: Big-endian/little-endian

2001-07-09 Thread Chas Owens
On 09 Jul 2001 13:00:40 -0400, Derrick Jamison wrote: > I am working on a script to move some data between databases and ran into a > problem. Basically I need to convert a field from big-endian to > little-endian before I move the data. I have been doing some digging trying > to see if there is

Big-endian/little-endian

2001-07-09 Thread Derrick Jamison
I am working on a script to move some data between databases and ran into a problem. Basically I need to convert a field from big-endian to little-endian before I move the data. I have been doing some digging trying to see if there is a function available for this, but I haven't found a clear, d

Re: RegExp problem

2001-07-09 Thread Jeff 'japhy' Pinyan
On Jul 9, saliminl said: >Hi. This is my first post. I'm trying to write a script that retrieves >data from a text file. The text files have several hundred instances of >the string "EAMBER (non-constraint) = #" where the # is a number that >can be negative and the last spacing after the equal

Re: Some help with a script

2001-07-09 Thread Tom Yarrish
Thanks for the help. Just as a side note, the check for $days being less than one was after I put the first version in production. I had the day value being subtracted somewhere else, so the first of the month because 0 instead of 28, 30, or 31. Which is where the subroutine came to be. On Mon

Re: "the right way"

2001-07-09 Thread dave hoover
Matija wrote: > I'm curious which of the two examples is more > preferred or it depends > entirely on someone style? > > $x = 1; > > #1) > if ($x) { $x = 0 } > #2) > $x = 0 if $x; > I think it's a matter of style, but also one should consider who will be mainta

RegExp problem

2001-07-09 Thread saliminl
Hi. This is my first post. I'm trying to write a script that retrieves data from a text file. The text files have several hundred instances of the string "EAMBER (non-constraint) = #" where the # is a number that can be negative and the last spacing after the equals sign is variable. My pro

Re: "the right way"

2001-07-09 Thread Paul
--- Matija Papec <[EMAIL PROTECTED]> wrote: > I'm curious which of the two examples is more preferred or it depends > entirely on someone style? > > $x = 1; > > #1) > if ($x) { $x = 0 } > #2) > $x = 0 if $x; > > IMO first is more convenient and orthodox but tha

"the right way"

2001-07-09 Thread Matija Papec
I'm curious which of the two examples is more preferred or it depends entirely on someone style? $x = 1; #1) if ($x) { $x = 0 } #2) $x = 0 if $x; IMO first is more convenient and orthodox but that is just me. :) -- Matija

Re:restart inetd

2001-07-09 Thread Jorge Goncalvez
- Begin Forwarded Message - Date: Mon, 9 Jul 2001 15:51:30 +0200 (MEST) From: Jorge Goncalvez Subject: Re:restart inetd To: [EMAIL PROTECTED] Mime-Version: 1.0 Content-MD5: b1MsrCSej6BG/kEEgK1mig== Hi, I made a button which could restart inetd but it seemed not working

Some help with a script

2001-07-09 Thread Tom Yarrish
Hey all, Okay, here's some background on this. I wrote a script (to replace an older batch file) for an NT server. The purpose of this script is to shut down a service, then move three files to another directory, and add the date to the end of the filename (ex. foo-20010709.log). Now, w

Re: Help with global variable

2001-07-09 Thread dave hoover
Kailash wrote: [snip] Start each of your scripts with the following, it will save you many hours of debugging: #!/usr/bin/perl -w use strict; > $input = ; Declaring your variables with 'my' will help you keep track of their scope: my $input = ; > # I process the input here > # If the output

RE: REGEX[2]

2001-07-09 Thread Govinderjit Dhinsa
> One problem (sorry), the program only reads the first line and not the > rest. Any suggestions, would be very much apprecated. > > # > I have a input file, below is a few *LINES* of example of the input file: > > 168127407932117187M000

Re: SMTP - outgoing email

2001-07-09 Thread Craig S Monroe
Stewart, I use the Mail::Sendmail package on my windows machine to send email with my scripts. I honestly haven't tested it on a Unix platform yet (building a machine now), but I would imagine it should work on Unix also. Craig [EMAIL PROTECTED] Pager Numeric: 1-877-895-3558 Email pager: [EMAIL

RE: REGEX

2001-07-09 Thread Abdulaziz Ghuloum
Hello You can use (split //) to get the characters of a string. @fields = split //, $line; printf sortcode "\n%6.6s%8.8s%27.27s%35.35s%35.35s", @fields[0..2,4..6]; # instead of $fields[0],$fields[1],$fields[2],$fields[4],$fields[5],$fields[6]; } Hope this helps Az

Re: REGEX

2001-07-09 Thread Robert Aspinall
Hello, I believe what you want to use is the substr function, as follows: $variable = substr($line, 4, 9); That would return the characters from 4 to 9 in the variable $line. Robert Aspinall Support Engineer V-ONE Corporation [EMAIL PROTECTED] - Original Message - From: "Govinderjit D

RE: REGEX

2001-07-09 Thread Govinderjit Dhinsa
Hi, can any body help me with a regex problem that I have please! # Q. Could any body please show me how to, print data by searching character Numbers in a input line! # I have a

Help with global variable

2001-07-09 Thread Kailash . Subramanian
Hi gurus, I want to read the STDIN as an input and I process the input whose output can be single field or multiple fileds which I want to store in variables. Based on that condition I want to perform two things, may be using sub-routines. Inside the sub-routine, if I try to refer to

Re: Concurrency

2001-07-09 Thread Ryan Boder
What I need to do is to have the application listening for connections while still allowing the user to do stuff. I am using IO::Socket and since the accept function blocks I think I have to use atleast 2 threads for this to happen. I would love it if someone would tell me otherwise however. Is

SMTP - outgoing email

2001-07-09 Thread Stewart Watkiss
Hello, Please can someone help with an SMTP problem I'm having. I am trying to use SMTP to send emails using PERL. I can't use sendmail etc. as this needs to work on both Win32 and UNIX (unless anyone knows of a free email client that can be called from Perl that works on Win32 and UNIX). I am d

Re: diff bet list and an array

2001-07-09 Thread Paul Johnson
On Mon, Jul 09, 2001 at 02:36:27PM +0200, Aaron Craig wrote: > > Which is exactly my point. I've been hanging around this list a while, and > programming Perl for a lot longer, and this is the first time the issue has > ever come up -- I admit that I didn't even know there was a difference >

Re: diff bet list and an array

2001-07-09 Thread Jos I. Boumans
in short, an array is inadvertently a list, a list is not necessarily an array. just contemplate this, something i'm sure we've all used: use vars qw($bar $baz) this is very much a list, but not an array hth, Jos Boumans > You are correct -- I should have read the documention :) However, in

RE: HTML and PERL Queries

2001-07-09 Thread John Edwards
You need to subscribe to the beginners-cgi mailing list. You can do that on this page http://learn.perl.org John -Original Message- From: Rahul Garg [mailto:[EMAIL PROTECTED]] Sent: 09 July 2001 13:32 To: [EMAIL PROTECTED] Subject: HTML and PERL Queries Hello, Well again some biggene

Re: diff bet list and an array

2001-07-09 Thread Aaron Craig
At 04:29 09.07.2001 -0800, Michael Fowler wrote: >On Mon, Jul 09, 2001 at 01:59:28PM +0200, Aaron Craig wrote: > > You are correct -- I should have read the documention :) However, in > every > > day programming-speak, list and array get tossed about in such a way that > > they become synonymous

HTML and PERL Queries

2001-07-09 Thread Rahul Garg
Hello, Well again some biggeners Q. 1.How do I call a perlscript from a HTML page. 2. Whats the way to fetch values from page and put again same values on HTML depending on the results of perlscript(dynamically). Can u give some references or perlscript examples regarding above. Help!!

Re: diff bet list and an array

2001-07-09 Thread Michael Fowler
On Mon, Jul 09, 2001 at 01:59:28PM +0200, Aaron Craig wrote: > You are correct -- I should have read the documention :) However, in every > day programming-speak, list and array get tossed about in such a way that > they become synonymous. They shouldn't be. The distinction can be important (

Re: diff bet list and an array

2001-07-09 Thread K Hendricks
An array is a list object in which all elements are indexed. A list is the context to which arrays belong. An list does not have to be referenced through an array and may be used as part of many functions. @array = (item1, item2, item3); # a list of items are assigned to an array. print $item1

Re: diff bet list and an array

2001-07-09 Thread Paul Johnson
On Mon, Jul 09, 2001 at 01:59:28PM +0200, Aaron Craig wrote: > > You are correct -- I should have read the documention :) However, in every > day programming-speak, list and array get tossed about in such a way that > they become synonymous. A list and an array seem to be effectively the > s

Re: Random field sequence tips

2001-07-09 Thread Abdulaziz Ghuloum
Hello The easiest way to do this is using hash slices. Let me explain. my %hash = (); # creates an empty hash $hash{name} = 'Aziz';# set the name $hash{id} = 512; #set the id $hash{bdate} = '12/3/1976/'; #set the bdate or, you can do this: %hash = (name => 'Aziz', id => 5

RE: Re: Random field sequence tips

2001-07-09 Thread paul
In reply-to Michael Fowler <[EMAIL PROTECTED]> on Mon Jul 9 13:06:42 2001 >On Mon, Jul 09, 2001 at 12:26:48PM +0100, [EMAIL PROTECTED] wrote: >> I have a text file produced by another system. The fields are semi-colon >> delimited, and the first line is a list of the fields, a header record, >>

Re: Another Newbie

2001-07-09 Thread Rajeev Rumale
I used http://www.netcat.co.uk/rob/perl/win32perltut.html for the begining lesssons Rajeev Rumale ~~~ Rajeev Rumale MyAngel.Net Pte Ltd.,Phone : (65)8831530 (office) #04-01, 180 B, The Benco

Re: XML

2001-07-09 Thread Rajeev Rumale
if your data is stored into a file in disk then you can just us file upload in and upload your file to some asp script which can recieve the file and then process it itself or pass it to any other scipt. you can use the input tage for this. I think you can do the reset. regards Rajeev Rumale

Re: diff bet list and an array

2001-07-09 Thread Aaron Craig
At 14:53 09.07.2001 +0200, Paul Johnson wrote: >On Mon, Jul 09, 2001 at 04:48:42PM +0530, baby lakshmi wrote: > > >>What is the difference between list and an array?? > > >>May be this very small question. but i would like to know the difference. > > >>The help in this regard is appreciated. > > >

Re: foreach examples/usage

2001-07-09 Thread David Wood
Evan Panagiotopoulos wrote: > > I am trying to learn the foreach loop. Is there a place on the web where there are >examples for the foreach? Basically I have an array of X elements and I > want to go >from the first element (is it zero?) Yes! > to the last. I have a variable containing the

Re: Random field sequence tips

2001-07-09 Thread Michael Fowler
On Mon, Jul 09, 2001 at 12:26:48PM +0100, [EMAIL PROTECTED] wrote: > I have a text file produced by another system. The fields are semi-colon > delimited, and the first line is a list of the fields, a header record, > also semi-colon delimited. You should investigate DBD::CSV. It has options fo

Re: diff bet list and an array

2001-07-09 Thread Michael Fowler
On Mon, Jul 09, 2001 at 04:30:26PM +0530, baby lakshmi wrote: > What is the difference between list and an array?? > May be this very small question. but i would like to know the difference. There is a difference between a list and an array, despite what some people have told you (I won't name na

Re: diff bet list and an array

2001-07-09 Thread Paul Johnson
On Mon, Jul 09, 2001 at 04:48:42PM +0530, baby lakshmi wrote: > > > Thank you for your mail. > then can u tell me, what does the following line mean (this is from perl > style) > > "To get the last element in a list or array, use $array[-1] instead of > $array[$#array]. The former works on bo

Random field sequence tips

2001-07-09 Thread paul
Tip request... I have a text file produced by another system. The fields are semi-colon delimited, and the first line is a list of the fields, a header record, also semi-colon delimited. The trick with this file is that each time the file is produced, the fields are not necessarily in the sa

Re: diff bet list and an array

2001-07-09 Thread baby lakshmi
Thank you for your mail. then can u tell me, what does the following line mean (this is from perl style) "To get the last element in a list or array, use $array[-1] instead of $array[$#array]. The former works on both lists and arrays, but the latter does not." Thank you REgards babylakshmi

Re: diff bet list and an array

2001-07-09 Thread baby lakshmi
Thank you for your mail. then what does the following line mean (this is from perl style) "To get the last element in a list or array, use $array[-1] instead of $array[$#array]. The former works on both lists and arrays, but the latter does not." >From: Aaron Craig <[EMAIL PROTECTED]> >To: [

Re: remplace ...

2001-07-09 Thread Aaron Craig
At 13:05 09.07.2001 +0200, [EMAIL PROTECTED] wrote: >Hi, > >I want to remplace all the word "html" in "php" in some web pages ... > >I tried this but nothing is happening : > >open (TRANS, "c:\\test\\test.txt"); > >@transformation=; > >foreach $ligne (@transformation) >{ >chomp($ligne); >$transfor

RE: remplace ...

2001-07-09 Thread John Edwards
Try this. Remember to save the data after you've changed it... --- $input = "c:\\test\\test.txt"; $output = "c:\\test\\out.txt"; open IN, $input or die "Can't open $input: $!"; open OUT, ">$output" or die "Can't open $output: $!"; while () { s/html/php/ig; print OUT; } close OUT

Re: diff bet list and an array

2001-07-09 Thread Aaron Craig
At 16:30 09.07.2001 +0530, baby lakshmi wrote: >hi, >What is the difference between list and an array?? >May be this very small question. but i would like to know the difference. >The help in this regard is appreciated. >Thank you >Regards >babylakshmi There isn't one. Aaron Craig Programming i

remplace ...

2001-07-09 Thread perl
Hi, I want to remplace all the word "html" in "php" in some web pages ... I tried this but nothing is happening : open (TRANS, "c:\\test\\test.txt"); @transformation=; foreach $ligne (@transformation) { chomp($ligne); $transform=$ligne; $transform=~s/html/php/g; }; close (TRANS);

Re: How to connect to a web server

2001-07-09 Thread Jos I. Boumans
You'll want the LWP module to do that if you're using windows and got active state's distro (www.activestate.com) it comes with the install. if you're on *nix, you'll probably want to download it from CPAN... you might as well get the full lib: http://search.cpan.org/search?dist=libwww-perl hth

diff bet list and an array

2001-07-09 Thread baby lakshmi
hi, What is the difference between list and an array?? May be this very small question. but i would like to know the difference. The help in this regard is appreciated. Thank you Regards babylakshmi _ Get Your Private, Free E-

RE:Net::ftp

2001-07-09 Thread Jorge Goncalvez
Hi How I can install Net::ftp I try with ppm but I didn't find it when I type search,I am under windows 98 and I wanted to install a ftp client. Thanks

How to connect to a web server

2001-07-09 Thread Rahul Garg
Hello, I am a beginner in Perl.Well, I want to know how thru perl script we can connect to a web server and fetch the files on webserver. Help!

Re: Concurrency

2001-07-09 Thread Nigel Wetters
Yep, using fork() will make your code less portable. If you want concurrency and don't want to use fork(), you'll need to either experiment with threads (as suggested by Jos), or build a multiplexed server using select(). One book I've found useful is Network Programming with Perl by Lincoln D

Re: R: download a file

2001-07-09 Thread Aaron Craig
At 12:59 07.07.2001 -0400, Fred Fortin wrote: > >> Why don't you just do print qq~ > >>http://my.host.com/name_of_file.xxx";>Click to getfile~; > >>and let the browser handle the rest for you. > >> > >>Because in that case, files like .txt or .html would appear in the browser > >>instead of being

Re: Concurrency

2001-07-09 Thread Jos I. Boumans
All depends what you really need... if you want simply to have one script send data to another script over a network, use IO::Socket it will do exactly what you want... however, if you're looking into threads, i can tell you that decent thread support for perl will (hopefully) be available when 5.