redirecting cookie

2007-01-10 Thread Slawomir Orlowski
Hello everybody, I have Linux Enterprise v4 apache 2.0.58 and perl 5.8.5. I have one web page domain1 (users are recognized by domain1cookie) I would like to move my web page to new domain2 and I would like users to be recognized by domain2cookie (which would have the some value as

Re: cgi.pm form save to .html

2007-01-10 Thread Sean Davis
On Tuesday 09 January 2007 22:22, Chris Henderson wrote: I'm trying to make a form using cgi.pm the output of which will be saved to a .html file. But the variables are not parsing correctly. If I put 3 names in 3 different places they all appear together instead of each appearing on each

Hi,, Regarding perl modules

2007-01-10 Thread Vikas Kumar Choudhary
Hi I am vikas here, just getting in perl.. can anybody told me to create modules and how to use these in our scripts.. Thanks Vikas Kumar Choudhary Software Engineer Bangalore-50078 Mobile:- 91-9886793145

Re: Reading a files in a folder

2007-01-10 Thread OROSZI Balázs
For a start: my $months_dir = '.'; opendir(DIR, $months_dir); my @months = readdir(DIR); closedir(DIR); foreach my $month (@months) { if (!-d $months_dir/$month || $month eq '.' || $month eq '..') { next; # skip if not dir, or if it is . or .. }

Redefining the behaviour of warn.

2007-01-10 Thread Muttley Meen
Hi. I have the code: $SIG{__WARN__} = sub { print $_[0]; } ; I'm expecting that when i use warn WARN; only WARN will be printed to STDERR, no other text. but perl is smart to tell me the file and the line, even though I did not requested that: WARN at ./1.pl line 4. Is there a way not to

Re: remove duplicate lines

2007-01-10 Thread Mumia W.
On 01/10/2007 01:35 AM, beast wrote: [...] It will only remove duplicate key. Is this still acceptable in perl (its very ugly =( [...] This would remove duplicate lines: use List::MoreUtils qw(uniq); use File::Slurp; my @list = uniq read_file 'rm_dup_lines.txt'; print $_ for

Re: remove duplicate lines

2007-01-10 Thread beast
Mumia W. wrote: On 01/10/2007 01:35 AM, beast wrote: [...] It will only remove duplicate key. Is this still acceptable in perl (its very ugly =( [...] This would remove duplicate lines: use List::MoreUtils qw(uniq); use File::Slurp; my @list = uniq read_file 'rm_dup_lines.txt';

Re: Redefining the behaviour of warn.

2007-01-10 Thread Peter Scott
On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote: I have the code: $SIG{__WARN__} = sub { print $_[0]; } ; I'm expecting that when i use warn WARN; only WARN will be printed to STDERR, no other text. but perl is smart to tell me the file and the line, even though I did not

Re: Hi,, Regarding perl modules

2007-01-10 Thread Andy Greenwood
On 10 Jan 2007 09:21:55 -, Vikas Kumar Choudhary [EMAIL PROTECTED] wrote: Hi I am vikas here, just getting in perl.. can anybody told me to create modules and how to use these in our scripts.. $ perldoc perlmod should get you started. To use modules you've created, just put this at the

Re: remove duplicate lines

2007-01-10 Thread Mathew
beast wrote: Mumia W. wrote: On 01/10/2007 01:35 AM, beast wrote: [...] It will only remove duplicate key. Is this still acceptable in perl (its very ugly =( [...] This would remove duplicate lines: use List::MoreUtils qw(uniq); use File::Slurp; my @list = uniq read_file

Re: Redefining the behaviour of warn.

2007-01-10 Thread Muttley Meen
On 1/10/07, Peter Scott [EMAIL PROTECTED] wrote: On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote: I have the code: $SIG{__WARN__} = sub { print $_[0]; } ; perldoc -f die (perldoc -f warn should probably be clearer on this.) Already did that :) $SIG{__WARN__} = sub { my $msg =

character substitution

2007-01-10 Thread Jim Magnuson
Hi, For purposes of doing some processing on a Finnish corpus, I want to convert repeated vowel strings to a single occurrence of the uppercase form of the vowel. That is: aa - A ii - I oo - O Is it possible to do this without specifying separate substitutions for each vowel? Thanks,

Re: character substitution

2007-01-10 Thread John W. Krahn
Jim Magnuson wrote: Hi, Hello, For purposes of doing some processing on a Finnish corpus, I want to convert repeated vowel strings to a single occurrence of the uppercase form of the vowel. That is: aa - A ii - I oo - O Is it possible to do this without specifying separate

Re: character substitution

2007-01-10 Thread Paul Johnson
On Wed, Jan 10, 2007 at 10:32:54AM -0500, Jim Magnuson wrote: For purposes of doing some processing on a Finnish corpus, I want to convert repeated vowel strings to a single occurrence of the uppercase form of the vowel. That is: aa - A ii - I oo - O Is it possible to do this

Re: character substitution

2007-01-10 Thread Tom Phoenix
On 1/10/07, Jim Magnuson [EMAIL PROTECTED] wrote: aa - A ii - I oo - O Is it possible to do this without specifying separate substitutions for each vowel? Yes; but I suspect that separate substitutions will be shorter to write, easier to maintain, faster to run, and simpler to debug. Of

Patten matching

2007-01-10 Thread Deepak Barua
Hi , i want to match a pattern like /* and */ with sometab or other whitespace before or after them what can be the match expression for the same..? Assume the pattern is stored in a variable ... $pattern=qr!/\*!; Regards Deepak -- Code Code Code Away -- To unsubscribe, e-mail: [EMAIL

Re: Patten matching

2007-01-10 Thread Tom Phoenix
On 1/10/07, Deepak Barua [EMAIL PROTECTED] wrote: Hi , i want to match a pattern like /* and */ with sometab or other whitespace before or after them what can be the match expression for the same..? It sounds as if you're looking for the whitespace metacharacter, which is /\s/ . Generally,

Re: Patten matching

2007-01-10 Thread Deepak Barua
Hi Tom, I 'll try it .. ? Thanks.. Regards Deepak On 1/10/07, Tom Phoenix [EMAIL PROTECTED] wrote: On 1/10/07, Deepak Barua [EMAIL PROTECTED] wrote: Hi , i want to match a pattern like /* and */ with sometab or other whitespace before or after them what can be the match

Re: character substitution

2007-01-10 Thread John W. Krahn
Paul Johnson wrote: On Wed, Jan 10, 2007 at 10:32:54AM -0500, Jim Magnuson wrote: For purposes of doing some processing on a Finnish corpus, I want to convert repeated vowel strings to a single occurrence of the uppercase form of the vowel. That is: aa - A ii - I oo - O Is it possible to

Re: Patten matching

2007-01-10 Thread Deepak Barua
Hi Tom, I was wondering if i use something like $start_pattern = qr!(.*?)/\*(.*?)|(.*?)//(.*?)!; if(($match_condition = m/($start_pattern)/) || $continue == 1) { } would it work ... i am getting this error Quantifier follows nothing in regex; marked by -- HERE

finding a replacing 0a in strings

2007-01-10 Thread Beginner
Hi, I am trying to parse a file and extract some names. The data has come with some odd characters in, and these characters are sandwiched in the middle of the string I am trying to extract. If i open the file in text editor it looks like this:  JON DAVIES/JIM  REED That leading space is

Re: finding a replacing 0a in strings

2007-01-10 Thread Tom Phoenix
On 1/10/07, Beginner [EMAIL PROTECTED] wrote: I am trying to parse a file and extract some names. The data has come with some odd characters in, and these characters are sandwiched in the middle of the string I am trying to extract. You can use Perl to tell you what the odd characters are. I

Re: finding a replacing 0a in strings

2007-01-10 Thread Beginner
On 10 Jan 2007 at 9:58, Tom Phoenix wrote: On 1/10/07, Beginner [EMAIL PROTECTED] wrote: You can use Perl to tell you what the odd characters are. I often use an ASCII table and unpack: print unpack(H*, $data), \n; MIKE \A0 \A0\A0HOLLINGSHEAD/JIM REED That has helped and I think

Re: Redefining the behaviour of warn.

2007-01-10 Thread Peter Scott
On Wed, 10 Jan 2007 08:32:26 -0500, Muttley Meen wrote: On 1/10/07, Peter Scott [EMAIL PROTECTED] wrote: On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote: I have the code: $SIG{__WARN__} = sub { print $_[0]; } ; perldoc -f die (perldoc -f warn should probably be clearer on this.)

getting the original filename from a symlink

2007-01-10 Thread S.A. Birl
I have a (Solaris 9) symlink that changing it's location every hour: symfile.jpg -- d.jpg symfile.jpg -- c.jpg symfile.jpg -- b.jpg symfile.jpg -- f.jpg symfile.jpg -- e.jpg symfile.jpg -- a.jpg What function can I perform against symfile.jpg to

Re: getting the original filename from a symlink

2007-01-10 Thread John W. Krahn
S.A. Birl wrote: I have a (Solaris 9) symlink that changing it's location every hour: symfile.jpg -- d.jpg symfile.jpg -- c.jpg symfile.jpg -- b.jpg symfile.jpg -- f.jpg symfile.jpg -- e.jpg symfile.jpg -- a.jpg What function can I perform against

RE: Redefining the behaviour of warn.

2007-01-10 Thread Christian, Ed
On 1/10/07, Peter Scott [EMAIL PROTECTED] wrote: On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote: I have the code: $SIG{__WARN__} = sub { print $_[0]; } ; perldoc -f die (perldoc -f warn should probably be clearer on this.) Already did that :) $SIG{__WARN__}

Re: getting the original filename from a symlink

2007-01-10 Thread S.A. Birl
On Jan 10, 2007, John W. Krahn ([EMAIL PROTECTED]) typed: John: S.A. Birl wrote: John: John: What function can I perform against symfile.jpg to find out the John: filename it points to (ie: d.jpg)? I looked at lstat(), but it doesnt John: look like the function I want. John: John:

RE: Redefining the behaviour of warn.

2007-01-10 Thread Christian, Ed
On 1/10/07, Peter Scott [EMAIL PROTECTED] wrote: On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote: I have the code: $SIG{__WARN__} = sub { print $_[0]; } ; perldoc -f die (perldoc -f warn should probably be clearer on this.) Already did that :)

iterating array; useless use of private variable

2007-01-10 Thread John W. Burns
The following code (which I'm sure can be greatly improved) works but generates a warning useless use of private variable in void context at two lines. I checked the diagnostic message out in Perl but still don't understand why it is flagged. Can anyone explain why the warning message?

% System Question

2007-01-10 Thread Guerrero, Citlali (GE, Corporate, consultant)
Hi all : Does anyone knows how to catch the error standard from a call to system? I mean something like this: use strict; use warnings; pritn Calling the second script : \n; system(perl hi_all.pl) exit; if the hi_all.pl script prints something to the STDERR it of course print it, but I

Re: iterating array; useless use of private variable

2007-01-10 Thread Tom Phoenix
On 1/10/07, John W. Burns [EMAIL PROTECTED] wrote: The following code (which I'm sure can be greatly improved) works but generates a warning useless use of private variable in void context at two lines. if ($count2=2) { $count3 = grep $_ == 1,

Re: % System Question

2007-01-10 Thread John W. Krahn
Guerrero, Citlali (GE, Corporate, consultant) wrote: Hi all : Hello, Does anyone knows how to catch the error standard from a call to system? perldoc -q stderr John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short

Re: remove duplicate lines

2007-01-10 Thread Dr.Ruud
beast schreef: a 100 a 102 c 100 a 102 b 111 c 100 c 102 c 100 c 100 a 102 ... I would like to have a list (either array or hash) with unique line . perl -ne'$_{$_}||=print' datafile or perl -pe'$_ x=!$$_++' datafile -- Affijn, Ruud Gewoon is een tijger. -- To

Calling a perl program from a perl script

2007-01-10 Thread Dharshana Eswaran
Hi All, I Have a perl program which runs successfully and gets the required output. I need to call that program from a perl script. I tried this using eval function. But it failed. Can i know how to do this? Can anyone guide me in this? Thanks and Regards, Dharshana

Re: Calling a perl program from a perl script

2007-01-10 Thread Jeff Pang
I Have a perl program which runs successfully and gets the required output. I need to call that program from a perl script. I tried this using eval function. But it failed. Can i know how to do this? Can anyone guide me in this? It's maybe good to define the called program to be a perl

Re: finding a replacing 0a in strings

2007-01-10 Thread Mumia W.
On 01/10/2007 12:22 PM, Beginner wrote: [...] This is the sequence I would like to change to a single space: 20a020a020a0 [...] AFAIK, tr/// can't do this. Use s///, s/[ \xA0]+/ /g; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: % System Question

2007-01-10 Thread Mumia W.
On 01/10/2007 04:20 PM, Guerrero, Citlali (GE, Corporate, consultant) wrote: Hi all : Does anyone knows how to catch the error standard from a call to system? I mean something like this: use strict; use warnings; pritn Calling the second script : \n; system(perl hi_all.pl) exit; if the

Re: character substitution

2007-01-10 Thread John W. Krahn
Jim Magnuson wrote: On Jan 10, 2007, at 10:44 AM, John W. Krahn wrote: Jim Magnuson wrote: For purposes of doing some processing on a Finnish corpus, I want to convert repeated vowel strings to a single occurrence of the uppercase form of the vowel. That is: aa - A ii - I oo - O

Re: Calling a perl program from a perl script

2007-01-10 Thread Dharshana Eswaran
On 1/11/07, Jeff Pang [EMAIL PROTECTED] wrote: I Have a perl program which runs successfully and gets the required output. I need to call that program from a perl script. I tried this using eval function. But it failed. Can i know how to do this? Can anyone guide me in this? It's maybe