Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I get an error saying t=\\d* isnt numeric, Im doing something stupid, what? Thanks for any help Jm#!/usr/bin/perl -i.bak -w use strict; ####Script to perform Inline editing of files##### ####Creates a .bak file with the contents of original file### my$dir='testSNL'; my@files; opendir(DIR, $dir) or die "Can't Open DIR\n"; while(my$file=readdir DIR){ push @files, "$dir/$file" unless -d "$dir/$file"; } closedir DIR; { local @ARGV=@files; while(<>){ s/A t=\d*/A/g; 't=\d*' <=>'t=\d*'; print } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sorting numbers
by Ovid (Cardinal) on Apr 10, 2002 at 23:11 UTC | |
|
Re: sorting numbers
by stephen (Priest) on Apr 10, 2002 at 23:04 UTC | |
|
Re: sorting numbers
by vladb (Vicar) on Apr 10, 2002 at 23:04 UTC |