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

Filtering Characters

2013-09-03 Thread Matt
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, underscores, numbers, da

Re: Recursive Validation Function

2013-09-03 Thread Rob Dixon
On 03/09/2013 06:56, Jim Gibson wrote: For readability, use the extended form and the more modern zero-width assertions \A and \z: if ( $_[0] !~ m{ \A [ric] \. (?:[1-578]) | (?:6 (\.[12])? ) \z }ix ) { Hi Jim You have incorrect parentheses. Your regex matches \A [ric] \. (?:[1-578]) o

Re: Recursive Validation Function

2013-09-03 Thread Rob Dixon
On 03/09/2013 02:23, John Aten wrote: Hello all, I am writing a script to rename files. The script prompts the user to enter tokens which will comprise part of the file name. These are made of letters and numbers separated by a dot, ie: R.3. The letters can be R, I or C, upper or lowercase. The