Goksie schreef:
> #!perl
> use warnings ;
> use strict ;
> my $fl = "c:/Perl/CDR_MSC_DAT/00016363.DAT";
That is probably not a line-oriented file.
I would change that line to the more robust:
my $fl = q{c:/Perl/CDR_MSC_DAT/00016363.DAT} ;
because filenames can contain sigils etc.
> { loca
Daniel Kasak schreef:
> I'm trying to split a date where the values can be separated by a dash
> '-' or a slash '/', eg:
> 2006-10-31 or 2006/10/31
>
> I'm using:
> my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd;
> but it doesn't work.
It does work, but not as you expected.
Read `perldoc -f s
On Mon, 2006-10-30 at 02:34 +0100, xavier mas wrote:
> A Dimarts 31 Octubre 2006 02:22, Daniel Kasak va escriure:
> > my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd;
>
> split function can't accept an expression on its syntax, only a character as
> separator field.
> --
> Xavier Mas
To Xavi
On Tue, 2006-10-31 at 12:22 +1100, Daniel Kasak wrote:
> I'm trying to split a date where the values can be separated by a dash
> '-' or a slash '/', eg:
> 2006-10-31 or 2006/10/31
>
> I'm using:
> my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd;
> but it doesn't work.
>
> If I just do:
> my
Daniel Kasak wrote:
> I'm trying to split a date where the values can be separated by a dash
> '-' or a slash '/', eg:
> 2006-10-31 or 2006/10/31
>
> I'm using:
> my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd;
> but it doesn't work.
Yes it does work, it's just that the capturing parentheses
>my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd;
my ( $, $mm, $dd ) = split /-|\//, $mmdd;
with this it works.
-Original Message-
From: Daniel Kasak [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 31, 2006 10:22 AM
To: beginners@perl.org
Subject: split and grouping in regexp
>
>I'm using:
>my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd;
>but it doesn't work.
>
Hello,
try split /\W/,$string pls.
$ perl -le '$str="2006/10/31";my ( $, $mm, $dd ) = split /\W/, $str;print
join " ",$, $mm, $dd'
2006 10 31
$ perl -le '$str="2006-10-31";my ( $, $mm, $dd
A Dimarts 31 Octubre 2006 02:22, Daniel Kasak va escriure:
> my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd;
split function can't accept an expression on its syntax, only a character as
separator field.
--
Xavier Mas
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-m
I'm trying to split a date where the values can be separated by a dash
'-' or a slash '/', eg:
2006-10-31 or 2006/10/31
I'm using:
my ( $, $mm, $dd ) = split /(-|\/)/, $mmdd;
but it doesn't work.
If I just do:
my ( $, $mm, $dd ) = split /-/, $mmdd;
it works for dates separated b
On 10/30/06, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
I am trying to read a UTF-8 coded file, decode its html character entities,
and print it into another UTF-8 coded file.
The program works fine if I write the line:
$t++; last if $t > 200;
What is the largest value you can use, instead
John W. Krahn wrote:
> Goksie wrote:
>
>> Tommy Nordgren wrote:
>>
>>> On 20 okt 2006, at 21.31, Goke Aruna wrote:
>>>
>>>
On 10/20/06, John W. Krahn <[EMAIL PROTECTED]> wrote:
> Goksie wrote:
>
>> Can someone advice me on how i can open .dat
Hi,
I am trying to read a UTF-8 coded file, decode its html character entities,
and print it into another UTF-8 coded file.
The program works fine if I write the line:
$t++; last if $t > 200;
If I comment that line (for parsing the entire file, and not only the first
200 lines), the program finis
"Oleg V. Volkov" <[EMAIL PROTECTED]> wrote:
[skip]
> Speaking of globals, AFAIK, I have virtually no drawbacks
> against "my", as long as I use "our" variables inside
> the scope. So what's bad there in using "our"?
After some thinking I've found a scenario where Alias::attr
use of globals can giv
- Original Message
From: Michael Alipio <[EMAIL PROTECTED]>
To: Michael Alipio <[EMAIL PROTECTED]>; beginners perl
Sent: Monday, October 30, 2006 1:25:36 PM
Subject: Re: Ok, this time Net::SSH2 question :-)
Hi,
Do you know if I still need to do something to enable Net::SSH::Perl to us
14 matches
Mail list logo