Re: Removing leading whitespace and removing alternate newlines

2010-11-01 Thread shawn wilson
yeah, it's one of those that you shouldn't modify or you might start seeing unexpected results. read perlvar or google 'perl input record separator' for more. On Mon, Nov 1, 2010 at 10:14 AM, Matthew Young wrote: > On Oct 31, 10:01 am, brian5432...@yahoo.co.uk (Brian) wrote: > > Hi guys, long ti

Re: Removing leading whitespace and removing alternate newlines

2010-11-01 Thread Matthew Young
On Oct 31, 10:01 am, brian5432...@yahoo.co.uk (Brian) wrote: > Hi guys, long time no working with PERL :-) > > I have just installed 5.2.12 > > First, I am trying to remove leading tabs & spaces but the following leaves a > few blanks at the beginning of each line, could someone be kind enough to

Re: Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Brian
Thank you John From: John W. Krahn To: Perl Beginners Sent: Sun, October 31, 2010 8:59:43 PM Subject: Re: Removing leading whitespace and removing alternate newlines Brian wrote: > Hi guys, long time no working with PERL :-) Hello, > I have just ins

Re: Removing leading whitespace and removing alternate newlines

2010-10-31 Thread John W. Krahn
Brian wrote: Hi guys, long time no working with PERL :-) Hello, I have just installed 5.2.12 First, I am trying to remove leading tabs& spaces Just tabs and spaces? Your code says all whitespace. but the following leaves a few blanks at the beginning of each line, You code only remov

Re: Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Brian
Thanks Shlomi, your "untested" code worked first time. :-) From: Shlomi Fish To: beginners@perl.org Cc: Brian Sent: Sun, October 31, 2010 4:23:52 PM Subject: Re: Removing leading whitespace and removing alternate newlines On Sunday 31 October 201

Re: Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Brian
: Sun, October 31, 2010 4:23:52 PM Subject: Re: Removing leading whitespace and removing alternate newlines On Sunday 31 October 2010 17:01:24 Brian wrote: > Hi guys, long time no working with PERL :-) > > I have just installed 5.2.12 > You probably mean perl-5.12.2 . A few more

Re: Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Shlomi Fish
On Sunday 31 October 2010 17:01:24 Brian wrote: > Hi guys, long time no working with PERL :-) > See: http://perl.org.il/misc.html#pl_vs_pl > I have just installed 5.2.12 > You probably mean perl-5.12.2 . A few more comments on your code: > First, I am trying to remove leading tabs & spaces

Re: Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Richard Hug
$string =~ s/^\s+//; http://oreilly.com/catalog/9781565922433/ page 43 That book is my bible!!! On Sun, Oct 31, 2010 at 11:01 AM, Brian wrote: > Hi guys, long time no working with PERL :-) > > I have just installed 5.2.12 > > First, I am trying to remove leading tabs & spaces but the following

Removing leading whitespace and removing alternate newlines

2010-10-31 Thread Brian
Hi guys, long time no working with PERL :-) I have just installed 5.2.12 First, I am trying to remove leading tabs & spaces but the following leaves a few blanks at the beginning of each line, could someone be kind enough to point out the error of my ways please? :-) #!/usr/bin/perl local $/=