Split function help

2006-04-17 Thread Irfan J Sayed
Hi, I have a following line/statement stored in variable $test deliver.Admin_Irfan_Project.20060413.212355 i want to split this line in . and store in array. I am using following code my @name = Split(/./, $test); but i am getting following error Use of uninitialized value in pattern match

Re: Split function help

2006-04-17 Thread M Senthil Kumar
On Mon, 17 Apr 2006, Irfan J Sayed wrote: Snip |i want to split this line in . and store in array. |I am using following code |my @name = Split(/./, $test); /Snip Try escaping . with a \. HTH, Senthil -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Split function help

2006-04-17 Thread nishanth ev
Hello, In case of linux you have to escape the . and the function name should be split and not Split. Not quite sure about windows. Regards Nishanth --- M Senthil Kumar [EMAIL PROTECTED] wrote: On Mon, 17 Apr 2006, Irfan J Sayed wrote: Snip |i want to split this line in . and store in

split function in perl

2006-04-17 Thread Irfan J Sayed
Hi, I have a following line stored in one variable $test. deliver.Admin_Irfan_Project.20060413.212355 . I need to split this line into the words and store the output in array. words should like this. deliver admin irfan project 20060413 212355 I am using following code to split this line

Re: Split function help

2006-04-17 Thread M Senthil Kumar
On Mon, 17 Apr 2006, M Senthil Kumar wrote: |On Mon, 17 Apr 2006, Irfan J Sayed wrote: | |Snip ||i want to split this line in . and store in array. ||I am using following code ||my @name = Split(/./, $test); |/Snip | |Try escaping . with a \. | |HTH, | |Senthil | And oh I forgot: Split should

Re: split function in perl

2006-04-17 Thread Xavier Noria
On Apr 17, 2006, at 10:30, Irfan J Sayed wrote: Hi, I have a following line stored in one variable $test. deliver.Admin_Irfan_Project.20060413.212355 . I need to split this line into the words and store the output in array. words should like this. deliver admin irfan project 20060413

Re: split function in perl

2006-04-17 Thread Dr.Ruud
Xavier Noria schreef: split /[\W_]/ Alternatives: split /\W|_/ split /[^[:alnum:]]/ -- Affijn, Ruud Gewoon is een tijger. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

redirecting array to file

2006-04-17 Thread Irfan J Sayed
Hi, Can anybody please tell me how to redirect / write the contents of array to the file Regards Irfan Sayed

Re: redirecting array to file

2006-04-17 Thread Dr.Ruud
Irfan J Sayed schreef: Can anybody please tell me how to redirect / write the contents of array to the file print $fh, @ary; You need to tell more, like what the file is for. -- Affijn, Ruud Gewoon is een tijger. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

encoding of source file

2006-04-17 Thread Brano Gerzo
Hi all, I have bunch of TXT files. I'd like to know theirs encoding, for example CP-1251 ISO-8859-1 ISO-8859-2 UTF-8 and so on. Exists some module for this (or something on *nix, it could be exe too) ? Thanks a lot /brano -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: redirecting array to file

2006-04-17 Thread Dr.Ruud
Dr.Ruud schreef: Irfan J Sayed: Can anybody please tell me how to redirect / write the contents of array to the file print $fh, @ary; Oops, I didn't mean that comma to be there: print $fh @ary; -- Affijn, Ruud Gewoon is een tijger. -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Catching the output in file

2006-04-17 Thread Irfan J Sayed
Hi, I am executing following command foreach $_ (@vob_list) { system cleartool lock vob:$_; } I want to catch the output of this system command in the file can anybody please tell me that how can i achieve that Regards Irfan Sayed

Re: Catching the output in file

2006-04-17 Thread Mr. Shawn H. Corey
On Mon, 2006-17-04 at 19:40 +0530, Irfan J Sayed wrote: Hi, I am executing following command foreach $_ (@vob_list) { system cleartool lock vob:$_; } I want to catch the output of this system command in the file can anybody please tell me that how can i achieve that Regards

Ordering Data on a web page

2006-04-17 Thread Graeme McLaren
Hi all, I need to order some data and I'm not exactly sure how to go about doing it. Say I have 10 records displayed on a web page and I have an Up and Down link which allows the user to move each record up by one or down by one. The problem I have is that I can't just get the current

Re: Catching the output in file

2006-04-17 Thread Chas Owens
On 4/17/06, Irfan J Sayed [EMAIL PROTECTED] wrote: snip I want to catch the output of this system command in the file snip TIMTOWTDI #shell redirection foreach my $vob (@vob_list) { system cleartool lock vob:$vob output; } #store in array my @output; foreach my $vob (@vob_list) { push

Re: Ordering Data on a web page

2006-04-17 Thread Mr. Shawn H. Corey
On Mon, 2006-17-04 at 16:03 +0100, Graeme McLaren wrote: Hi all, I need to order some data and I'm not exactly sure how to go about doing it. Say I have 10 records displayed on a web page and I have an Up and Down link which allows the user to move each record up by one or down by one.

RE: Catching the output in file

2006-04-17 Thread Timothy Johnson
You could always use backticks (``) to capture the output in an array and then print it to a file. -Original Message- From: Irfan J Sayed [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 7:11 AM To: beginners@perl.org Subject: Catching the output in file Hi, I am executing

Re: Catching the output in file

2006-04-17 Thread JupiterHost.Net
Irfan J Sayed wrote: Hi, Hello, I am executing following command foreach $_ (@vob_list) { system cleartool lock vob:$_; } I want to catch the output of this system command in the file can anybody please tell me that how can i achieve that a) have the shell do it: cleartool lockk

Lexical analysis of log file

2006-04-17 Thread Joshua Colson
I have a log file of the format: ### BEGIN LOG ### [datestamp unique-id]: message [datestamp unique-id]: message ( [field] = value [field2] = value [etc...] = value ) [datestamp unique-id]: message ( [field9] = value [field3] = value [etc...] = value ) ### END LOG ### Each 'record'

Question about File Uploads

2006-04-17 Thread Mike Martin
Hi I have a CGI script that uses filefields to get filenames before passing to the shell and I want to disable the creation of a tempfile. After googling for a while I cant find out where to turn this behaviour off. I have found references to $use_tempfiles variable, but am having difficulties

RE: Lexical analysis of log file

2006-04-17 Thread Timothy Johnson
Was this logfile made by a particular product? There might be a module made specifically for it. -Original Message- From: Joshua Colson [mailto:[EMAIL PROTECTED] Sent: Monday, April 17, 2006 1:57 PM To: Perl Beginners Subject: Lexical analysis of log file I have a log file of the

RE: Lexical analysis of log file

2006-04-17 Thread Joshua Colson
On Mon, 2006-04-17 at 14:08 -0700, Timothy Johnson wrote: Was this logfile made by a particular product? There might be a module made specifically for it. No. It is a home brewed application. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

combine 2 open for reading filehandles

2006-04-17 Thread JupiterHost.Net
Howdy list :) I'm having a bit of a time with combining 2 read filehandles. Let me explain, use strict; use warnings; use IPC::Open3; my ($write_fh, $read_fh, $error_fh); open3($write_fh, $read_fh, $error_fh, ... while($read_fh) { ... } while($error_fh) { ... } works fine, great.. What

Re: encoding of source file

2006-04-17 Thread M. Kristall
Brano Gerzo wrote: Hi all, I have bunch of TXT files. I'd like to know theirs encoding, for Try Encode::Guess http://search.cpan.org/~dankogai/Encode-2.15/lib/Encode/Guess.pm -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Question about File Uploads

2006-04-17 Thread M. Kristall
Mike Martin wrote: Hi I have a CGI script that uses filefields to get filenames before passing to the shell and I want to disable the creation of a tempfile. After googling for a while I cant find out where to turn this behaviour off. I have found references to $use_tempfiles variable, but am

Re: combine 2 open for reading filehandles

2006-04-17 Thread M. Kristall
JupiterHost.Net wrote: Howdy list :) I'm having a bit of a time with combining 2 read filehandles. [snip] What I'd like to do is process $read_fh and $error_fh in the order they actually happen ( which is what open3($write_fh, $read_fh, $read_fh, ... does ) but still have the error handle

Re: combine 2 open for reading filehandles

2006-04-17 Thread John W. Krahn
JupiterHost.Net wrote: Howdy list :) Hello, I'm having a bit of a time with combining 2 read filehandles. The FAQ has a good explanation about that: perldoc -q stderr John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Setting Content-Length Header In CGI.pm

2006-04-17 Thread Mike Martin
Does anyone know if this is possible? I have a pair of scripts which take in up to 6 filefields, munge them so path info remains and get sent to shell commands. However after a certain amount of data I get a Invalid Content-Length error and it bombs out. Googled to no avail. As ever any help

Re: Setting Content-Length Header In CGI.pm

2006-04-17 Thread Mr. Shawn H. Corey
On Tue, 2006-18-04 at 01:47 +0100, Mike Martin wrote: Does anyone know if this is possible? I have a pair of scripts which take in up to 6 filefields, munge them so path info remains and get sent to shell commands. However after a certain amount of data I get a Invalid Content-Length

Re: Lexical analysis of log file

2006-04-17 Thread Tom Phoenix
On 4/17/06, Joshua Colson [EMAIL PROTECTED] wrote: I need to know what cpan modules people would recommend for tokenizing these records. Maybe Parse::RecDescent? http://search.cpan.org/~dconway/Parse-RecDescent-1.94/lib/Parse/RecDescent.pod Hope this helps! --Tom Phoenix Stonehenge

sorting an array of arrays by arr_el[$idx][2] (or something like that)

2006-04-17 Thread Ed
I'm still hobbled by my thinking in C problem so I'm looking for a way to do this. I'm reading from a file and constructing an array of arrays. Here's an example of what's in the file: net localgroup Field Aidan /ADD net localgroup Internal Aidan /ADD net localgroup CM Aidan /ADD net localgroup