umar Subas
> Oct 12, 2012 12:35:41 AM';
>
> I’m trying to perform a split via \s (spaces) delimiter, but
> this give me a partial return of "Initial Baseline” (returns
> Initial). Is there a regex where I can split using space as the
> delimiter, but get all the words inside a q
Hi Danny,
On Thu, 19 Mar 2015 21:42:53 +
"Danny Wong (dannwong)" wrote:
> Nevermind. I used regex to accomplish what I wanted instead of the split
> command. Thanks guys!
>
Just a note in general: sometimes when a simple split or a regex match fails
you may opt to
Nevermind. I used regex to accomplish what I wanted instead of the split
command. Thanks guys!
From: Danny H Wong mailto:dannw...@cisco.com>>
Date: Thursday, March 19, 2015 at 2:25 PM
To: Perl List mailto:beginners@perl.org>>, Perl Beginners
mailto:beginners@perl.org>>
Subjec
Hi Perl GURU,
I have a string like this:
'Baseline: (_bMgvUBQ_EeKsP6DECdq0Lg) 1 "Initial Baseline" "Initial Baseline of
Component NGP-Diagnostics" Sivakumar Subas Oct 12, 2012 12:35:41 AM';
I’m trying to perform a split via \s (spaces) delimiter, but this give me
and wind surfing that has grown too large and should be
> >split into smaller sections to reduce load time.
> >Can anyone point me to any tools/modules that would automate the
> >process of fixing all the links?
>
> I'm only a beginner in Perl myself so I don
re.html
> > about sailing and wind surfing that has grown too large and should be
> > split into smaller sections to reduce load time.
> > Can anyone point me to any tools/modules that would automate the
> > process of fixing all the links?
> That's an awesome e
On Thu, Apr 17, 2014 at 10:01:35AM -0700, Mike McClain wrote:
> Hi,
> My brother Rick, a windrider, put together a webpage,
> http://www.photographers1.com/Sailing/NauticalTerms&Nomenclature.html
> about sailing and wind surfing that has grown too large and should be
>
On 2014-04-17 18:01, Mike McClain wrote:
Hi,
My brother Rick, a windrider, put together a webpage,
http://www.photographers1.com/Sailing/NauticalTerms&Nomenclature.html
about sailing and wind surfing that has grown too large and should be
split into smaller sections to reduce load
Hi Mike,
On Thu, 17 Apr 2014 10:01:35 -0700
Mike McClain wrote:
> Hi,
> My brother Rick, a windrider, put together a webpage,
> http://www.photographers1.com/Sailing/NauticalTerms&Nomenclature.html
> about sailing and wind surfing that has grown too large and should be
>
Hi,
My brother Rick, a windrider, put together a webpage,
http://www.photographers1.com/Sailing/NauticalTerms&Nomenclature.html
about sailing and wind surfing that has grown too large and should be
split into smaller sections to reduce load time.
Can anyone point me to any tools/mod
ileinfo;" with $fileinfo[0]
>> being the file name, $fileinfo[1] the hash?
>> Such 'key:value:...' combinations is probably something frequently
>> used. I'm finding some examples to this and don't know what would be
>> the best way to do it.
&
59 PM, Edward and Erica Heim wrote:
Hi all,
I'm using LWP::UserAgent to access a website. One of the methods
returns HTML data e.g.
my $data = $response->content;
I.e. $data contains the HTML content. I want to be able to parse it
line by line e.g.
foreach (split /pattern/, $data) {
Hi Rahim,
On Fri, 3 May 2013 18:39:57 +0100
Rahim Fakir wrote:
> Sorry i not in your level of experience.
> If i want to start a mail about perl to wich email should i adress?
> I just got started with hello world, and nothing else run's, iam so sad.
>
Please write a new message to beginners@p
LWP::UserAgent to access a website. One of the methods returns
>> HTML data e.g.
>>
>> my $data = $response->content;
>>
>> I.e. $data contains the HTML content. I want to be able to parse it line
>> by line e.g.
>>
>> foreach (split /pattern/, $dat
>
> I.e. $data contains the HTML content. I want to be able to parse it line
> by line e.g.
>
> foreach (split /pattern/, $data) {
> my $line = $_;
> .
>
> If I print $data, I can see the individual lines of the HTML data but I'm
> not clear on the "patt
ward and Erica Heim wrote:
> > Hi all,
>
> Hello,
>
> > I'm using LWP::UserAgent to access a website. One of the methods
> > returns HTML data e.g.
> >
> > my $data = $response->content;
> >
> > I.e. $data contains the HTML content. I want
to be able to parse it
> line by line e.g.
>
> foreach (split /pattern/, $data) {
> my $line = $_;
> ..
>
> If I print $data, I can see the individual lines of the HTML data
> but I'm not clear on the "pattern" that I should use in split or if
to parse it line by
> line e.g.
>
> foreach (split /pattern/, $data) {
>my $line = $_;
> ..
>
> If I print $data, I can see the individual lines of the HTML data but I'm not
> clear on the "pattern" that I should use in split or if there is a better
So you want to split the HTML in a way that $_ becomes one full line of text?
It really depends how the HTML is written. If it's written all on one line
(which is the case sometimes) you would probably need to go another route.
If the HTML is written on multiple lines (and it should b
Hi all,
I'm using LWP::UserAgent to access a website. One of the methods
returns HTML data e.g.
my $data = $response->content;
I.e. $data contains the HTML content. I want to be able to parse it line
by line e.g.
foreach (split /pattern/, $data) {
my $line = $_;
..
If
Matthew Bonner wrote:
Hi Anamika
I know this thread has focussed on using split -- thought I'd add a
regex powered version for reference/comparison.
cheers
Matthew
use strict;
use warnings;
while () {
my @keys;
@keys = $_ =~ m/(NM_\d+)+/g;
$_ =~ m/
Hi Anamika
I know this thread has focussed on using split -- thought I'd add a
regex powered version for reference/comparison.
cheers
Matthew
use strict;
use warnings;
while () {
my @keys;
@keys = $_ =~ m/(NM_\d+)+/g;
$_ =~ m/\:1\s+(.*)$/;
print "
On 2012-04-04 16:33, lina wrote:
my ($keys, $value) = split /[ ]+/, $line;
That is better written as
split " ", $line;
See perldoc -f split, about this special (and default) split mode.
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional comman
Not sure about the code but i think below logic might work,
1) split the line into two parts , one is patterns and another is values
2) split /assign the patterns to an array and take the count
3) write a loop till the above count is reach and use the value taken in
first step for each pattern
0.955794504181601
NM_001042541:1 0.955794504181601
NM_019584:1 0.900900900900901
NM_198862:1 0.835755813953488
NM_001039093 0.805008944543828
NM_001039092 0.805008944543828
NM_153080:1 0.805008944543828
I am using split function first to separate column 1 with column 2 and
then based upon
3828
>
> and want output like this:
>
> NM_009648 0.955794504181601
> NM_001042541:1 0.955794504181601
> NM_019584:1 0.900900900900901
> NM_198862:1 0.835755813953488
> NM_001039093 0.805008944543828
> NM_001039092 0.805008944543828
> NM_153080:1 0.
On 12-04-04 08:57 AM, Anamika K wrote:
Could you please suggest my how to proceed?
You should use two splits: one to separate the data by white space into
two; and another to separate the first datum by commas.
--
Just my 0.0002 million dollars worth,
Shawn
Programming is as much abo
> NM_001039092 0.805008944543828
> NM_153080:1 0.805008944543828
>
> I am using split function first to separate column 1 with column 2 and
> then based upon "comma" I need to split column 1. But as you can see,
> in the column 1, there are sometimes more than
0.955794504181601
NM_019584:1 0.900900900900901
NM_198862:1 0.835755813953488
NM_001039093 0.805008944543828
NM_001039092 0.805008944543828
NM_153080:1 0.805008944543828
I am using split function first to separate column 1 with column 2 and
then based upon "comma" I need to split col
On Sat, Dec 17, 2011 at 08:22:31AM +, vishnu.kuma...@wipro.com wrote:
> Hi,
Hello:
> I am trying to convert the string abc.def.ghi.amm to
> abcdefghiamm using split and concatenation. I am missing
> something somewhere.. please help me to fix the code
>
> my $string
Thanks guys for your suggestion
-Original Message-
From: Shlomi Fish [mailto:shlo...@shlomifish.org]
Sent: Saturday, December 17, 2011 2:48 PM
To: vishnu.kuma...@wipro.com
Cc: beginners@perl.org
Subject: Re: Split and concatenation
Hi Vishnu,
On Sat, 17 Dec 2011 08:22:31 +
On 2011-12-17 09:20, T D, Vishnu wrote:
I am trying to convert the string abc.def.ghi.amm to abcdefghiamm
$string =~ s/\.+//g
using split and concatenation.
join "", split /\.+/, $string
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additiona
Hi,
I am trying to convert the string abc.def.ghi.amm to abcdefghiamm using split
and concatenation. I am missing something somewhere.. please help me to fix the
code
my $string = "abc.def.ghi.amm";
my @d = split(/\./,"$string");
my $e = @d;
for (my $i=0; $i < $e; $i++
On Fri, Dec 16, 2011 at 09:36:53PM -0600, Chris Stinemetz wrote:
> This program does all I need it to do. I am having some difficulty
> wrapping my head around it though. Mainly the for loop. Did Rob use
> special varible?
>
> If any one can explain it to me so I can have a better understanding
>
vishnu.kuma...@wipro.com wrote:
Hi,
Hello,
I am trying to convert the string abc.def.ghi.amm to abcdefghiamm
using split and concatenation. I am missing something somewhere.
. please help me to fix the code
my $string = "abc.def.ghi.amm";
my @d = split(/\./,"$string");
Hi Vishnu,
On Sat, 17 Dec 2011 08:22:31 +
wrote:
> Hi,
>
> I am trying to convert the string abc.def.ghi.amm to abcdefghiamm using split
> and concatenation. I am missing something somewhere.. please help me to fix
> the code
>
> my $string = "abc.def.gh
Hi,
I am trying to convert the string abc.def.ghi.amm to abcdefghiamm using split
and concatenation. I am missing something somewhere.. please help me to fix the
code
my $string = "abc.def.ghi.amm";
my @d = split(/\./,"$string");
my $e = @d;
for (my $i=0; $i < $e; $i++
>
> However I think it's more likely that you need /all/ of the data to be
> output, so I suggest something like my program below.
>
> HTH,
>
> Rob
>
>
> use strict;
> use warnings;
>
> my @headers;
>
> while () {
> if (@headers) {
split() splits on whitespace by default. so the "\s+/" is
optional.
$_ = "3 element array";
@words = split;
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Thursday, December 15, 2011, Chris Stinemetz
wrote:
>
> It isn't a company policy just circumstance. The unix box I'm using
> doesn't support DNS nameserver lookup or a C compiler.
>
> I'm currently using Perl 5.6.1 which doesnt' support local::lib and I
> can't install perlbrew to upgrade my
Hi Chris,
On Thu, 15 Dec 2011 15:29:08 -0600
Chris Stinemetz wrote:
> >
> > Is that your company's policy, or do you just lack root access? If it's the
> > latter, then see the various resources at
> > http://perl-begin.org/topics/cpan/ ,
> > so you can see how to install Perl modules from CPAN
>
> Is that your company's policy, or do you just lack root access? If it's the
> latter, then see the various resources at http://perl-begin.org/topics/cpan/ ,
> so you can see how to install Perl modules from CPAN under your home
> directory.
>
It isn't a company policy just circumstance. The u
Hi Chris,
On Thu, 15 Dec 2011 11:58:00 -0600
Chris Stinemetz wrote:
> On Thu, Dec 15, 2011 at 10:42 AM, Dr.Ruud wrote:
> > On 2011-12-14 05:43, Chris Stinemetz wrote:
> >
> >> I am trying to split the first element of an array by white space then
> >> cont
> To: Perl Beginners
> Cc: Ken Slater; Chris Stinemetz
> Subject: Re: split function
>
> On 15/12/2011 16:09, Ken Slater wrote:
> >
> > I have not been following this too closely, but I don't understand
> the
> > algorithm used to get the above ou
>
> Tool completed successfully
>
Thank you Rob! This is what I was trying to accomplish. I'm going to
have to research to find out exactly what you did.
Thanks agian,
Chris
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http:
On 15/12/2011 16:09, Ken Slater wrote:
I have not been following this too closely, but I don't understand the
algorithm used to get the above output.
What is that Ken? If you don't understand the question then ask some
questions of your own!
I would have named it @fieldValues since arrays
On 15/12/2011 15:47, Chris Stinemetz wrote:
>
> I'm getting a bit closer. There a couple roadblocks I am up against.
>
> I am able to split the lines by white space, but for some reason the
> program isn't capturing the first lines to the @fieldValue array after
> the
> -Original Message-
> From: Ken Slater [mailto:kl...@psu.edu]
> Sent: Thursday, December 15, 2011 11:09 AM
> To: 'Chris Stinemetz'; 'John W. Krahn'
> Cc: 'Perl Beginners'
> Subject: RE: split function
>
> > -Original M
On Thu, Dec 15, 2011 at 10:42 AM, Dr.Ruud wrote:
> On 2011-12-14 05:43, Chris Stinemetz wrote:
>
>> I am trying to split the first element of an array by white space then
>> continue reading the rest of the file.
>> Thus far I am having trouble figuring out how to split t
On 2011-12-14 05:43, Chris Stinemetz wrote:
I am trying to split the first element of an array by white space then
continue reading the rest of the file.
Thus far I am having trouble figuring out how to split the first line.
You have an XY problem, you are probably looking for
http
> -Original Message-
> From: Chris Stinemetz [mailto:chrisstinem...@gmail.com]
> Sent: Thursday, December 15, 2011 10:47 AM
> To: John W. Krahn
> Cc: Perl Beginners
> Subject: Re: split function
>
> I'm getting a bit closer. There a couple roadblocks I am
I'm getting a bit closer. There a couple roadblocks I am up against.
I am able to split the lines by white space, but for some reason the
program isn't capturing the first lines to the @fieldValue array after
the @headerNames array.
Once I get all the lines to go into the array correct
timothy adigun wrote:
Hi Chris,
Please check added code to yours, in addition to what John wrote;
I am trying to split the first element of an array by white space then
continue reading the rest of the file.
Thus far I am having trouble figuring out how to split the first line.
I would like
Hi Chris,
Please check added code to yours, in addition to what John wrote;
I am trying to split the first element of an array by white space then
continue reading the rest of the file.
Thus far I am having trouble figuring out how to split the first line.
I would like the first line to be
Chris Stinemetz wrote:
I am trying to split the first element of an array by white space then
continue reading the rest of the file.
Thus far I am having trouble figuring out how to split the first line.
I would like the first line to be split so it looks like the following
with the "=&
I am trying to split the first element of an array by white space then
continue reading the rest of the file.
Thus far I am having trouble figuring out how to split the first line.
I would like the first line to be split so it looks like the following
with the "=" sign added.
Th
On Wed, Aug 17, 2011 at 9:58 PM, Randal L. Schwartz
wrote:
> Golfers do NOT understand the DAMAGE they are doing to Perl's
> perception outside the Perl community, and I wish they'd damn well
> stop.
In my experience, people outside of the Perl community perceive /any/
Perl as obfuscated anyway
> Golfers do NOT understand the DAMAGE they are doing to Perl's
> perception outside the Perl community,
What is golf?
Hi Marc,
Perl "golf" is a game where one reduce the number of characters {key
"strokes"} used in a perl program, just like how golf players seek to hit
balls into series
On Aug 17, 2011, at 6:58 PM, Randal L. Schwartz wrote:
> Golfers do NOT understand the DAMAGE they are doing to Perl's
> perception outside the Perl community,
What is golf?
Marc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@
> ""John" == "John W Krahn" writes:
>> That's deprecated though, if not already gone. (Looks gone in Perl
>> 5.14.) It was a readily-admitted misfeature.
John> Unless you're playing golf. :-)
I'd argue that Golf itself is a misfeature of Perl. More like a bug.
Golfers do NOT understan
fried
>>>
>>> find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split "/"; rename $_,
>>> "./$p[$#p].txt" } '
>>
>> Try this:
>>
>> find /xyz -type f -print0 | perl -F/ -0lane 'rename $_,"$F[-1].txt" or
>>
Randal L. Schwartz wrote:
"John" == "John W Krahn" writes:
John> split() uses @_ by default so you could just say:
That's deprecated though, if not already gone. (Looks gone in Perl
5.14.) It was a readily-admitted misfeature.
Unless you're playing golf.
>>>>> "John" == "John W Krahn" writes:
John> split() uses @_ by default so you could just say:
That's deprecated though, if not already gone. (Looks gone in Perl
5.14.) It was a readily-admitted misfeature.
--
Randal L. Schwartz - Stonehenge Consul
On 12/08/2011 18:52, Rob Dixon wrote:
> On 12/08/2011 00:17, siegfr...@heintze.com wrote:
>> This works! Is there a way to do it with less typing? How can I do it
>> without creating a temporary variable "@p"?
>> Thanks,
>> siegfried
>>
>> fin
On 12/08/2011 00:17, siegfr...@heintze.com wrote:
This works! Is there a way to do it with less typing? How can I do it
without creating a temporary variable "@p"?
Thanks,
siegfried
find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split "/"; rename $_,
"./$p[$#p].t
On Thu, Aug 11, 2011 at 7:17 PM, wrote:
> find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split "/"; rename $_,
> "./$p[$#p].txt" } '
If I'm reading this right then it looks like you're trying to
recursively move all files in /xyz into the curren
ing a temporary variable "@p"? Thanks,
siegfried
find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split "/"; rename $_,
"./$p[$#p].txt" } '
Try this:
find /xyz -type f -print0 | perl -F/ -0lane 'rename $_,"$F[-1].txt" or
warn $!'
That
ry variable "@p"? Thanks,
> siegfried
>
> find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split "/"; rename $_,
> "./$p[$#p].txt" } '
Try this:
find /xyz -type f -print0 | perl -F/ -0lane 'rename $_,"$F[-1].txt" or
warn $!'
Shawn H Corey wrote:
On 11/08/11 07:17 PM, siegfr...@heintze.com wrote:
This works! Is there a way to do it with less typing? How can I do it
without creating a temporary variable "@p"?
Thanks,
siegfried
find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split "/";
On Thu, 11 Aug 2011 16:17:51 -0700, wrote:
> This works! Is there a way to do it with less typing? How can I do it
> without creating a temporary variable "@p"?
rename($_, sprintf("./%s.txt", (split '/')[-1]));
--
To unsubscribe, e-mail: beginners-unsubscr
On 8/11/11 Thu Aug 11, 2011 4:17 PM, "siegfr...@heintze.com"
scribbled:
> This works! Is there a way to do it with less typing? How can I do it
> without creating a temporary variable "@p"?
> Thanks,
> siegfried
>
> find /xyz -exec perl -e 'foreach(
On 11/08/11 07:17 PM, siegfr...@heintze.com wrote:
This works! Is there a way to do it with less typing? How can I do it
without creating a temporary variable "@p"?
Thanks,
siegfried
find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split "/"; rename $_,
"./$p[$#p].
This works! Is there a way to do it with less typing? How can I do it
without creating a temporary variable "@p"?
Thanks,
siegfried
find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split "/"; rename $_,
"./$p[$#p].txt" } '
--
To unsubscribe, e-mail: begin
On Sun, May 15, 2011 at 11:51:35AM -0700, John W. Krahn wrote:
>
> split ' ', $line;
>
> John
Smacking my forehead in chagrin. :-)
You're absolutely right John, I just didn't read far enough.
Thank you,
Mike
--
Satisfied user of Linux since 1997.
O< asc
On 2011-05-15 18:28, Mike McClain wrote:
In reading in a file of space separated columns of numbers
and stuffing them into an array, I used:
while( my $line =<$FH> )
{ my @arr = split /\s+/, $line;
push @primes_array, @arr;
}
but kept getting empty array e
On May 15, 12:28 pm, mike.j...@cox.net (Mike McClain) wrote:
> In reading in a file of space separated columns of numbers
> and stuffing them into an array, I used:
> while( my $line = <$FH> )
> { my @arr = split /\s+/, $line;
> push @primes_array, @arr;
Mike McClain wrote:
In reading in a file of space separated columns of numbers
and stuffing them into an array, I used:
while( my $line =<$FH> )
{ my @arr = split /\s+/, $line;
push @primes_array, @arr;
}
but kept getting empty array entries until I switc
In reading in a file of space separated columns of numbers
and stuffing them into an array, I used:
while( my $line = <$FH> )
{ my @arr = split /\s+/, $line;
push @primes_array, @arr;
}
but kept getting empty array entries until I switched to:
while( <$FH>
On Jan 23, 2:55 am, jwkr...@shaw.ca ("John W. Krahn") wrote:
> Peter K. Michie wrote:
> > I have this regex expression in a script that appears to do an array
> > like split of a string but I cannot figure out how it does so. Any
> > help appreciated
>
> &
Peter K. Michie wrote:
I have this regex expression in a script that appears to do an array
like split of a string but I cannot figure out how it does so. Any
help appreciated
$fname = ($0 =~ m[(.*/)?([^/]+)$])[1] ;
print "7 $errlog\n";
$fpath = ($0 =~ m[(.*/)?([^/]+)$])[0] ;
print
I have this regex expression in a script that appears to do an array
like split of a string but I cannot figure out how it does so. Any
help appreciated
$fname = ($0 =~ m[(.*/)?([^/]+)$])[1] ;
print "7 $errlog\n";
$fpath = ($0 =~ m[(.*/)?([^/]+)$])[0] ;
print "8 $errlog\n";
Hi;
>> The reason one should use File::Basename and File::Spec is that you
>> can become platform-independent instead of Windoze-worshipping :-)
>
> What does the operating system have to do with this?
>
> OP asked how to split a string, I gave an example how to do it
On 2010-11-29 02:27, Kenneth Wolcott wrote:
On Sun, Nov 28, 2010 at 12:31, Dr.Ruud wrote:
On 2010-11-28 10:54, Chaitanya Yanamadala wrote:
How do i split a value like this
F:\test\test123\test1233
For example:
ruud$ perl -wle 'print for split //, q{F:\test\test123\test1233}'
F
>
> For a Windows shop, the overhead of platform independence is redundant,
>
Premature optimization much?
Brian.
> "ES" == Erez Schatz writes:
ES> On 11/29/2010 03:27 AM, Kenneth Wolcott wrote:
>>
>> The reason one should use File::Basename and File::Spec is that you
>> can become platform-independent instead of Windoze-worshipping :-)
>>
>> Ken Wolcott
>>
ES> I worship whatever I'm
On 11/29/2010 03:27 AM, Kenneth Wolcott wrote:
>
> The reason one should use File::Basename and File::Spec is that you
> can become platform-independent instead of Windoze-worshipping :-)
>
> Ken Wolcott
>
I worship whatever I'm paid to work on. For a Windows shop, the overhead
of platform in
Hi;
On Sun, Nov 28, 2010 at 12:31, Dr.Ruud wrote:
> On 2010-11-28 10:54, Chaitanya Yanamadala wrote:
>
>> How do i split a value like this
>> F:\test\test123\test1233
>
> For example:
>
> ruud$ perl -wle 'print for split //, q{F:\test\test123\test1233}'
On 2010-11-28 10:54, Chaitanya Yanamadala wrote:
How do i split a value like this
F:\test\test123\test1233
For example:
ruud$ perl -wle 'print for split //, q{F:\test\test123\test1233}'
F
:
\
t
e
s
t
\
t
e
s
t
1
2
3
\
t
e
s
t
1
2
3
3
--
Ruud
--
To unsubscribe, e-mail: beginner
Take extra caution with the backslash-scapes..
---
use 5.010;
use strict;
use warnings;
my $str1 = "F:\test\test123\test1233"; #Wrong! Backslash being expanded!
my $str2 = 'F:\test\test123\test1233';
my @array1 = split(/\\/, $str1);
my @array2 = split(/\\/, $str2);
my $
>>How do i split a value like this
>>F:\test\test123\test1233
use strict;
use warnings;
my $str='F:\test\test123\test1233';
my @values = split /\\/, $str;
print "@values";
Cheers,
Parag
On Sun, Nov 28, 2010 at 1:54 AM, Chaitanya Yanamadala <
dr.virus.in...@
Hi Chaitanya,
On Sunday 28 November 2010 11:54:14 Chaitanya Yanamadala wrote:
> How do i split a value like this
> F:\test\test123\test1233
>
> please help me with this..
>
You should use File::Spec (and related modules such as File::Basename) to
manipulate path names, instead
How do i split a value like this
F:\test\test123\test1233
please help me with this..
Regards
Chaitanya
Hi Agnello,
On Monday 18 October 2010 15:01:56 Agnello George wrote:
> I know the problem is solved but Could the script be done like this ??
>
OK, I'll answer it.
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
>
> while (my $line = ) {
Why are you using *DATA and __DATA__ for the data
On Sat, Oct 16, 2010 at 2:11 PM, Shlomi Fish wrote:
> On Thursday 14 October 2010 16:54:32 yo RO wrote:
> > Hello I need to split a log file per days
> > I have a file in txt format and I want to create a file with all data
> > from one day in one file
> > I will give
0;11:12\\trafic info
3_23_2010;11:34\\trafic info
On Sat, Oct 16, 2010 at 2:11 PM, Shlomi Fish wrote:
> On Thursday 14 October 2010 16:54:32 yo RO wrote:
> > Hello I need to split a log file per days
> > I have a file in txt format and I want to create a file with all data
> > f
On Oct 16, 10:41 am, shlo...@iglu.org.il (Shlomi Fish) wrote:
> On Thursday 14 October 2010 16:54:32 yo RO wrote:
>
>
>
> > Hello I need to split a log file per days
> > I have a file in txt format and I want to create a file with all data
> > from one day in on
use strict;
use warnings;
my %log;
while(){
chomp;
my ($key, $value) = split /;/, $_;
push @{$log{$key}}, $value;
}
foreach my $k (keys %log){
open my $k_fh, '>', "$k.log" or die "Could not open the file - $k.log
: $! \n";
foreach my $v
On Thursday 14 October 2010 16:54:32 yo RO wrote:
> Hello I need to split a log file per days
> I have a file in txt format and I want to create a file with all data
> from one day in one file
> I will give example
>
> I have this imput
> 3_21_2010;11:12\\trafic info
>
On Thu, Oct 14, 2010 at 4:54 PM, yo RO wrote:
> Hello I need to split a log file per days
> I have a file in txt format and I want to create a file with all data
> from one day in one file
> I will give example
>
> I have this imput
> 3_21_2010;11:12\\trafic info
> 3_21
Hello I need to split a log file per days
I have a file in txt format and I want to create a file with all data
from one day in one file
I will give example
I have this imput
3_21_2010;11:12\\trafic info
3_21_2010;11:34\\trafic info
3_21_2010;13:21\\trafic info
3_22_2010;11:12\\trafic info
1 - 100 of 1148 matches
Mail list logo