Re: Recursive Validation Function

2014-01-02 Thread John Aten
me time to get back to it some day soon; I was a little optimistic in my planning. Thanks again! On Sep 4, 2013, at 10:55 PM, beginners-digest-h...@perl.org wrote: > > beginners Digest 5 Sep 2013 03:55:27 - Issue 4576 > > Topics (messages 123410 through 123433): > > Re: R

Re: Recursive Validation Function

2013-09-04 Thread Mike Flannigan
On 9/2/2013 8:23 PM, John 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

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

Re: Recursive Validation Function

2013-09-02 Thread Jim Gibson
On Sep 2, 2013, at 6:23 PM, 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

Re: Recursive Validation Function

2013-09-02 Thread Andy Bach
On Monday, September 2, 2013, John Aten wrote: my $valid_token = validate_tokens($token); Too bad it doesn't work! Even if I put in valid tokens on the first shot, there are errors: You're passing the token as a parameter to the sub but the is using $_ for the match. You need to assign t

Recursive Validation Function

2013-09-02 Thread John Aten
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 first number can be one through eight