Please help... struggling beginner.

2003-06-23 Thread Denham Eva
Hello, I am very much a novice at perl and probably bitten off more than I can chew here. I have a file, which is a dump of a database - so it is a fixed file format. The problem is that I am struggling to manipulate it correctly. I have been trying for two days now to get a program to work. The

Log into a site and do stuff

2003-06-23 Thread Aman Thind
Hi I am working on a module that occasionally needs to raise alarms by sending sms to concerned ppl. For this, I would like to login to the site : www.sms.ac The login page is http://www.sms.sc/login.asp Then I have to go to the main page , fill the To: and Message: textboxes and send sms. I h

Re: Please help... struggling beginner.

2003-06-23 Thread Tassilo von Parseval
On Mon, Jun 23, 2003 at 10:43:07AM +0200 Denham Eva wrote: > I am very much a novice at perl and probably bitten off more than I can chew > here. > I have a file, which is a dump of a database - so it is a fixed file format. > The problem is that I am struggling to manipulate it correctly. I have

Re: Please help... struggling beginner.

2003-06-23 Thread Paul Johnson
Denham Eva said: > Hello, > > I am very much a novice at perl and probably bitten off more than I can > chew > here. > I have a file, which is a dump of a database - so it is a fixed file > format. > The problem is that I am struggling to manipulate it correctly. I have > been > trying for two day

Why

2003-06-23 Thread Scott_G
Hello. I am new to Perl. I used to program in C years ago (not C++ # etc) I have the simplest question. I am running active state perl 5 on Win XP. I'm using OpenPERL Ide 1.0 #!k:/perl/bin/perl.exe # # Camel-Learning Perl # Exercise 2-4 # Input a & b from Console # Then multiply & print them #

context, printing, and concatenation

2003-06-23 Thread Peter
I'm on the first few chapters of "Learning Perl" and came up with a question. Given: - #!/usr/bin/perl @array = qw ( one two three ); print @array . "\n"; print @array; - Can you explain why the first print statement print

installing modules

2003-06-23 Thread mario kulka
How can I install the MD5 module on the server where I'm hosting my website? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

installing modules

2003-06-23 Thread mario kulka
Could anyone give me step by tep instructions on how to install a perl module (MD5) on my host server. How come they don't have it installed? Isn't popular enough? Sorry if I sent the same message for the second time, but the prvious one doesn't came through on my list. Mariusz __

Re: context, printing, and concatenation

2003-06-23 Thread Paul Johnson
Peter said: > I'm on the first few chapters of "Learning Perl" and came up with a > question. Given: > > - > > #!/usr/bin/perl > > @array = qw ( one two three ); > print @array . "\n"; > print @array; > > - > > Can you explai

perl reg exp problem

2003-06-23 Thread Robin Garbutt
Hi all, I have a string that is a random sequence like the following:- ACGTCGTCGTCACACACACGCGTCTCTATACGCG I want to be able to parse the string, picking out any TATA sequences, colour them in red and make a not of where ther lie in the sequence. Is this possible with perl? cheers Rob. =

Re: perl reg exp problem

2003-06-23 Thread Janek Schleicher
Robin Garbutt wrote at Mon, 23 Jun 2003 11:40:47 +0100: > I have a string that is a random sequence like the following:- > > ACGTCGTCGTCACACACACGCGTCTCTATACGCG > > I want to be able to parse the string, picking out any TATA sequences, > colour them in red and make a not of where ther lie in the

Re: installing modules

2003-06-23 Thread Janek Schleicher
Mario Kulka wrote at Mon, 23 Jun 2003 03:40:03 +: > Could anyone give me step by tep instructions on how to install a perl > module (MD5) on my host server. How come they don't have it installed? Isn't > popular enough? BTW, the MD5 module is deprecated. It is recommended to install Digest:

RE: perl reg exp problem

2003-06-23 Thread Robin Garbutt
what does shift do in perl? cheers Rob. > -Original Message- > From: Janek Schleicher [mailto:[EMAIL PROTECTED] > Sent: 23 June 2003 08:52 > To: [EMAIL PROTECTED] > Subject: Re: perl reg exp problem > > > Robin Garbutt wrote at Mon, 23 Jun 2003 11:40:47 +0100: > > > I have a string th

Re: Why

2003-06-23 Thread Janek Schleicher
Scott_g wrote at Sun, 22 Jun 2003 15:21:24 -0500: > Hello. I am new to Perl. I used to program in C years ago (not C++ # > etc) > > I have the simplest question. I am running active state perl 5 on Win > XP. > > I'm using OpenPERL Ide 1.0 > > #!k:/perl/bin/perl.exe > # > # Camel-Learning Perl >

Re: There has to be a way to do this

2003-06-23 Thread scott . e . robinson
I don't have code to do what I want, but here's the pieces I'm trying to string together: Abbreviation dictionary consists of a file like this: SRED. SREDNE SEV. SEVERN etc. Each abbreviation is turned into four regexes, like this (doubtless they could be made more efficient, but they work wel

RE: Why

2003-06-23 Thread Charles K. Clarkson
Scott_G <[EMAIL PROTECTED]> wrote: : : Hello. I am new to Perl. I used to program in C : years ago (not C++ # etc) : : I have the simplest question. I am running active : state perl 5 on Win XP. : : I'm using OpenPERL Ide 1.0 : It's probably your IDE. This works from a console: print

Re: perl reg exp problem

2003-06-23 Thread Rob Anderson
"Robin Garbutt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] what does shift do in perl? cheers Rob. > -Original Message- > From: Janek Schleicher [mailto:[EMAIL PROTECTED] > Sent: 23 June 2003 08:52 > To: [EMAIL PROTECTED] > Subject: Re: perl reg exp problem > > > Robin

Re: perl reg exp problem

2003-06-23 Thread Rob Anderson
Opps double clicked first time round, I blame my mouse :-) Robin, perl has online documentation for all it's functions and much more. try the following perldoc -f shift and perldoc perldoc for more general advice HTH "Rob Anderson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

RE: Can LWP::Simple tranfer image urls?

2003-06-23 Thread Dan Muey
> Finally, some usefull stuff in Perl ;-)) > Finally? This is the Perl list not the PHP list ;p -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Process question

2003-06-23 Thread Steve Blumenkrantz
Since I didn't get any responses on my last question about process creation and the killing of child processes I thought that maybe I'd switch gears a bit and ask: On Unix does one know how I can get the process id of a process kicked off from within a perl script via the back-tic ("`") syntax?

SSH Problem

2003-06-23 Thread Rudolf Kliemstein
Hi all, i have the following problem with the following script: #!/usr/bin/perl -w # $Id: cmd.pl,v 1.4 2001/02/22 00:14:48 btrott Exp $ use strict; use Net::SSH::Perl; use Net::SSH::Perl::Cipher; chomp(my $this_host = `hostname`); print "Enter a host name to connect to: [$this_host] "; chomp(m

RE: Quick CGI query_string() question

2003-06-23 Thread Dan Muey
> > So if $q above is : hi=bye&love=hate&one=two&etc=etc > > Hmmm. Do you work for the State Department or something? Or > the White House Press office? That was a good one > > > > I want to remove, say 'love', so it'd be: hi=bye&one=two&etc=etc > > > > I know I could do a regex but I'd like

RE: Can LWP::Simple tranfer image urls?

2003-06-23 Thread Dan Muey
> > Do I need to change the http header for transfering image > urls? I get errors Yes. And what do you mean by 'transfer'? You may want Net::FTP > when I transfer a jpg: > picture cannot be displayed because it contains errors. > Try this: #!/usr/bin/perl -w use strict; use LWP::Simple;

Re: context, printing, and concatenation

2003-06-23 Thread Jeff 'japhy' Pinyan
On Jun 22, Peter said: >print @array . "\n"; >print @array; > >Can you explain why the first print statement prints "3" (and a carriage >return) while the second prints "onetwothree"? My understanding is that >the first print sees the array in scalar context while the second sees >it in list cont

CHOMP and {$query->param( question...

2003-06-23 Thread Gregg O'Donnell
I have a Publication Order Form, with checkboxes beside each title. The list needs to be emailed to ONLY the department that carries the publication ordered (not all departments). I think I should I grab the form data, use CHOMP to get only "fire" from "fire-01" but then how do I get it into {

Re: perl reg exp problem

2003-06-23 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Janek Schleicher wrote: > Robin Garbutt wrote at Mon, 23 Jun 2003 11:40:47 +0100: > >> I have a string that is a random sequence like the following:- >> >> ACGTCGTCGTCACACACACGCGTCTCTATACGCG >> >> I want to be able to parse the string, picking out any TATA seque

Re: There has to be a way to do this

2003-06-23 Thread Jeff 'japhy' Pinyan
On Jun 23, [EMAIL PROTECTED] said: >SRED. SREDNE >SEV. SEVERN ># Match it at beginning of line >$cgname =~ s/^SRED\.(?=[\W\s\-\d]+)/SREDNE:/g ; Three things -- the + modifier on the [...] isn't needed, you don't need to put \s and - in a character class you've already put \W in, and the /g modi

Logging to a file or FH?

2003-06-23 Thread deb
I've got a script which opens a filehandle to write print statments to a file. But, I'm also running some system commands, and I would also like to send stdout and stderr to that filehandle. I could just echo text to a file, or I could use a filehandle. Which would be "better?" my $log

simple script

2003-06-23 Thread Tso, Joseph - eSpeed
Hi, I really green to perl and would like suggestions on creating a script that would allow users to modify a certain file from a web page. This file is a list of customers a particular sales person will cover. So, the web page will allow this sales person to add, delete and update this customer

RE: simple script

2003-06-23 Thread Dan Muey
> Hi, I really green to perl and would like suggestions on > creating a script that would allow users to modify a certain > file from a web page. This file is a list of customers a > particular sales person will cover. So, the web page will > allow this sales person to add, delete and update

Re: installing modules

2003-06-23 Thread zentara
On Mon, 23 Jun 2003 03:40:03 +, [EMAIL PROTECTED] (Mario Kulka) wrote: >Could anyone give me step by tep instructions on how to install a perl >module (MD5) on my host server. How come they don't have it installed? Isn't >popular enough? > >Sorry if I sent the same message for the second tim

Logging to a file or FH?

2003-06-23 Thread deb
(Apologies if this gets out to you more than once...) I've got a script which opens a filehandle to write print statments to a file. But, I'm also running some system commands, and I would also like to send stdout and stderr to that filehandle. I could just echo text to a file, or I could use a f

Re: Process question

2003-06-23 Thread John W. Krahn
Steve Blumenkrantz wrote: > > Since I didn't get any responses on my last question about process creation > and the killing of child processes I thought that maybe I'd switch gears a > bit and ask: > > On Unix does one know how I can get the process id of a process kicked off > from within a per

CGI header() and print question

2003-06-23 Thread Dan Muey
I think this is ok but I want to make sure I'm not missing some obvious thing. If I do some headers with print and then do a CGI header(), that will work ok right? IE: use CGI qw(:standard); print "Set-Cookie: $c\n"; print header(); ... OR use CGI qw(:standard); print "Set-Cookie: $c\n"; prin

using FIle::Find::name if regex to filter

2003-06-23 Thread magelord
hi, how can i use a real regex with this: File::Find::name if -x? the filetestops are working fine, but how can i filter things like .gz$? i tried many ways, but all failed. any idea? thanks!! bye andreas -- .::Please visit my homepage::. http://www.math55.de.vu .::A very good JAVA site (wort

reading file into hash?

2003-06-23 Thread Tim McGeary
I'm still very green to perl, so please forgive this possibly stupid question. I want to setup a configuration file to have a list of alpha codes delimiter and a unique number that will match the code e.g. PACT | 23 PART | 24 etc How is the best way to read such a file into my program (hash ?)

Parsing a file

2003-06-23 Thread Morrison, Trevor (Trevor)
Hi, I am new to using Perl to parse a file. What I am trying to do is parse a file that is made of online orders. I have written some code using for and if statements that will go through the file line by line and using regex I try to match the information with the variables so that I can wri

Passing control to another perl program....

2003-06-23 Thread Hamish Whittal
Hi all, I have this scenario: I have a 'main' program that needs to call on progA under condtions A, progB under conditions B, etc. Now, I would like the progA, progB, progC to remain independent of the 'main' program at all times. The only thing I would like to connect them is the paramteres

Re: perl reg exp problem

2003-06-23 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Robin Garbutt wrote: > Hi all, > > I have a string that is a random sequence like the following:- > > ACGTCGTCGTCACACACACGCGTCTCTATACGCG > > I want to be able to parse the string, picking out any TATA sequences, > colour them in red and make a not of where ther

RE: Passing control to another perl program....

2003-06-23 Thread Dan Muey
> Hi all, Howdy > > I have this scenario: > I have a 'main' program that needs to call on progA under > condtions A, progB under conditions B, etc. > > Now, I would like the progA, progB, progC to remain > independent of the 'main' program at all times. The only > thing I would like to conn

Re: reading file into hash?

2003-06-23 Thread Madhu Reddy
This will do ... alpha_hash is u r hash... - my %alpha_hash = (); open(FH_D,"$d_list") || die "File opening $d_list\n"; @file_list = ; foreach $record (@file_list) { @t_array = split(/\|/, $record); $alpha_hash{$t_array[0]} = $t_array[1]; } close(FH_D); --- Tim

Re: reading file into hash?

2003-06-23 Thread Madhu Reddy
This will do ... alpha_hash is u r hash... - my %alpha_hash = (); open(FH_D,"$d_list") || die "File opening $d_list\n"; @file_list = ; foreach $record (@file_list) { @t_array = split(/\|/, $record); $alpha_hash{$t_array[0]} = $t_array[1]; } close(FH_D); --- Tim

Re: Logging to a file or FH?

2003-06-23 Thread John W. Krahn
Deb wrote: > > I've got a script which opens a filehandle to write print statments to a file. > But, I'm also running some system commands, and I would also like to send > stdout and stderr to that filehandle. I could just echo text to a file, or I > could use a filehandle. Which would be "bette

basic question: handling input to TCP/IP server

2003-06-23 Thread McMahon, Christopher x66156
Hello all... I've implemented the TCP/IP server at the top of p.441 of The Camel (3rd edition) Chapter 16, and it's working fine. That is, it opens the port I tell it to, and other processes connect to it and happily send it stuff. (This is using IO::Socket::INET). But now I'm a little c

Re: using FIle::Find::name if regex to filter

2003-06-23 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > hi, how can i use a real regex with this: > > File::Find::name if -x? > > the filetestops are working fine, but how can i filter things like > .gz$? i tried many ways, but all failed. any idea? thanks!! File::Find puts the current file name into $_ in the callback s

Re: reading file into hash?

2003-06-23 Thread John W. Krahn
Tim McGeary wrote: > > I'm still very green to perl, so please forgive this possibly stupid > question. > > I want to setup a configuration file to have a list of alpha codes > delimiter and a unique number that will match the code e.g. > > PACT | 23 > PART | 24 > etc > > How is the best way to

RE: basic question: handling input to TCP/IP server

2003-06-23 Thread Gupta, Sharad
Something like this worked for me in the past: use strict; use IO::Socket::INET; my $sock = IO::Socket::INET(); while(1) { my $output; my $n = sysread($sock,$output,1000); last if(!defined($n)); print STDOUT $output; } And using syswrite() for writing. perldo

Re: Logging to a file or FH?

2003-06-23 Thread deb
Cool. I didn't know about the IPC::Open3 module. Will look at it. Thanks for the pointer! deb At 15:04:25, on 06.23.03: Cracks in my tinfoil beanie allowed John W. Krahn to seep these bits into my brain:, > Deb wrote: > > > > I've got a script which opens a filehandle to write print statments

Re: reading file into hash?

2003-06-23 Thread Steve Grazzini
On Mon, Jun 23, 2003 at 01:39:49PM -0700, Madhu Reddy wrote: A little unasked-for code review :-) > my %alpha_hash = (); > open(FH_D,"$d_list") || die "File opening $d_list\n"; ^ ^ You don't need to quote the variable. > @file_list = ; > foreach $record (@file_list) { And in

Help needed on XML Files

2003-06-23 Thread Remo, Sherwin
List, I would like to write a script that would check the correct syntax of an XML file. Need to check if the file is XML compliant. Is there a module that I can use to do this? Thanks!

Re: perl reg exp problem

2003-06-23 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Janek Schleicher wrote: > Robin Garbutt wrote at Mon, 23 Jun 2003 11:40:47 +0100: > >> I have a string that is a random sequence like the following:- >> >> ACGTCGTCGTCACACACACGCGTCTCTATACGCG >> >> I want to be able to parse the string, picking out any TATA seque

Re: Parsing a file

2003-06-23 Thread John W. Krahn
Trevor Morrison wrote: > > Hi, Hello, > I am new to using Perl to parse a file. What I am trying to do is > parse a file that is made of online orders. I have written some code > using for and if statements that will go through the file line by line > and using regex I try to match the informa

Re: Passing control to another perl program....

2003-06-23 Thread Tassilo von Parseval
On Mon, Jun 23, 2003 at 10:04:22PM +0200 Hamish Whittal wrote: > I have this scenario: > I have a 'main' program that needs to call on progA under condtions A, > progB under conditions B, etc. > > Now, I would like the progA, progB, progC to remain independent of the > 'main' program at all times

Running Perl programs on a machine that does not have Perl installed

2003-06-23 Thread Dave Mamanakis
I have a perl program that I need to be able to run on all kinds of machines. However, I cannot install perl on each of these machines. It has to be run locally, not over a network (too many issues with security) How can this be done? I know with several other languages, you can make an EXE or copy

Re: Running Perl programs on a machine that does not have Perl installed

2003-06-23 Thread Asif Iqbal
I think there is something called perl2exe . Try googling it. On Mon, 23 Jun 2003, Dave Mamanakis wrote: > I have a perl program that I need to be able to run on all kinds of machines. > However, I cannot install perl on each of these machines. > It has to be run locally, not over a network (too