Re: edit_file and edit_file_lines

2011-05-14 Thread Uri Guttman
> "OR" == Octavian Rasnita writes: OR> Congratulations for the idea of adding this helpful feature to OR> File::Slurp. OR> It is also useful for adding a string at the beginning of the file OR> in an easy way, using something like: OR> edit_file { $_ = "first line\n" . $_ } 'file

Re: edit_file and edit_file_lines

2011-05-14 Thread Octavian Rasnita
From: "Uri Guttman" > > hi all, > > As with other releases of File::Slurp I think this list should be told > about it since this module is so easy to use and makes your Perl much > simpler and also faster. > > uri > > Have you ever wanted to use perl -pi inside perl? did you have the guts > to

edit_file and edit_file_lines

2011-05-14 Thread Uri Guttman
hi all, As with other releases of File::Slurp I think this list should be told about it since this module is so easy to use and makes your Perl much simpler and also faster. uri Have you ever wanted to use perl -pi inside perl? did you have the guts to localize $^I and @ARGV to do that? now you

Re: pushing a string into a array

2011-05-14 Thread Rob Dixon
On 14/05/2011 08:57, Agnello George wrote: I got a string like this $string = ' [a b c d]' i need to get a b c d in to a array called @all. i was was trying to so a split with delimiter '\s+' but still i get [a b c d] but i want a b c d any idea how to get this done , thanks By the

Re: pushing a string into a array

2011-05-14 Thread Agnello George
On Sat, May 14, 2011 at 1:37 PM, Brandon McCaig wrote: > On Sat, May 14, 2011 at 3:57 AM, Agnello George > wrote: >> I got a string like this >> >> $string  = ' [a b  c  d]' >> >> i need to get a b c d in to a array called @all. >> >> i was was trying to so a split with delimiter '\s+' but still

Re: pushing a string into a array

2011-05-14 Thread Brandon McCaig
On Sat, May 14, 2011 at 3:57 AM, Agnello George wrote: > I got a string like this > > $string  = ' [a b  c  d]' > > i need to get a b c d in to a array called @all. > > i was was trying to so a split with delimiter '\s+' but still  i get > > [a > b > c > d] > > but i want > > a > b > c > d > > > a

pushing a string into a array

2011-05-14 Thread Agnello George
hi I got a string like this $string = ' [a b c d]' i need to get a b c d in to a array called @all. i was was trying to so a split with delimiter '\s+' but still i get [a b c d] but i want a b c d any idea how to get this done , thanks -- Regards Agnello D'souza -- To unsubscribe, e