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
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
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
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
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
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
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
Hi,
Can anybody please tell me how to redirect / write the contents of array
to the file
Regards
Irfan Sayed
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,
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,
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]
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
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
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
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
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.
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
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
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'
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
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
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]
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
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]
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
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
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:
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
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
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
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
31 matches
Mail list logo