Re: Searching in a line
- From: "Jürgen Exner" <jurgenex@xxxxxxxxxxx>
- Date: Wed, 29 Aug 2007 22:00:27 GMT
Jürgen Exner wrote:
lerameur wrote:
On Aug 29, 5:25 pm, "Jürgen Exner" <jurge...@xxxxxxxxxxx> wrote:
lerameur wrote:
I want to do a search in a log file. each line has the following
pattern:
34,56,,9,0,0,,,,65;
So there 10 section. How do I parse through different sections?
Ok, ok, that split() syntax is not correct, I forgot to specify the
pattern. If you had included a self-contained minimal program then I
could have tested my suggestion and that would not have happened.
Here's the spoonfed version:
my $foo = '34,56,,9,0,0,,,,65';
my $bar = (split(/,/,$foo))[3];
print $bar;
jue
.
- References:
- Searching in a line
- From: lerameur
- Re: Searching in a line
- From: Jürgen Exner
- Re: Searching in a line
- From: lerameur
- Re: Searching in a line
- From: Jürgen Exner
- Searching in a line
- Prev by Date: Re: Mac: Perl script that will run when double-clicked
- Next by Date: Re: Appending a character to a field
- Previous by thread: Re: Searching in a line
- Next by thread: Re: Searching in a line
- Index(es):
Relevant Pages
|
|