Re: Filtering Characters

2013-09-04 Thread Rob Dixon
On 04/09/2013 03:58, Michael Rasmussen wrote: On Wed, Sep 04, 2013 at 02:31:30AM +0100, Rob Dixon wrote: John's solution: next if /[^[:lower:]_\d\-. ]/; Doesn't work in this test environment: michael@bivy:~$ cat tpl && ./tpl #!/usr/bin/perl use strict; use warnings;

Re: Filtering Characters

2013-09-03 Thread Jim Gibson
On Sep 3, 2013, at 7:58 PM, Michael Rasmussen wrote: > On Wed, Sep 04, 2013 at 02:31:30AM +0100, Rob Dixon wrote: >> Matt wrote: >>> I have this: >>> >>> while () { >>> chomp; >>> next if /^#/; >>> # do stuff >>> } >>> >>> >>> It skips to the next item in the while loop of the string

Re: Filtering Characters

2013-09-03 Thread Michael Rasmussen
On Wed, Sep 04, 2013 at 02:31:30AM +0100, Rob Dixon wrote: > Matt wrote: > >I have this: > > > >while () { > >chomp; > >next if /^#/; > ># do stuff > >} > > > > > >It skips to the next item in the while loop of the string begins with > ># and works fine. I would also like to skip

Re: Filtering Characters

2013-09-03 Thread Rob Dixon
Matt wrote: >I have this: > >while () { >chomp; >next if /^#/; ># do stuff >} > > >It skips to the next item in the while loop of the string begins with ># and works fine. I would also like to skip to the next item in the >loop if the string contains anything other then lowercase,

Re: Filtering Characters

2013-09-03 Thread John Delacour
On 3 Sep 2013, at 18:08, Matt wrote: > It skips to the next item in the while loop of the string begins with > # and works fine. I would also like to skip to the next item in the > loop if the string contains anything other then lowercase, > underscores, numbers, dashes, periods, and spaces. I

Re: Filtering Characters

2013-09-03 Thread Jing Yu
Maybe you should put chomp after the filtering line? Jing On 4 Sep 2013, at 01:08, Matt wrote: > I have this: > > while () { >chomp; >next if /^#/; ># do stuff >} > > > It skips to the next item in the while loop of the string begins with > # and works fine. I would also like

Re: Filtering Characters

2013-09-03 Thread John W. Krahn
Matt wrote: I have this: while () { chomp; next if /^#/; # do stuff } It skips to the next item in the while loop of the string begins with # and works fine. I would also like to skip to the next item in the loop if the string contains anything other then lowercase, unders

Re: Filtering Characters

2013-09-03 Thread Nathan Hilterbrand
On 9/3/2013 1:08 PM, Matt wrote: I have this: while () { chomp; next if /^#/; # do stuff } It skips to the next item in the while loop of the string begins with # and works fine. I would also like to skip to the next item in the loop if the string contains anything other t