-pi switches
[email protected] (allan) Thu, 28 Mar 2002 12:17:28 +0800
| Newsgroups | perl.macperl.anyperl |
|---|---|
| Message-ID | <[email protected]> |
hello
i need to detab a bunch of files in a bunch of directories.
this script:
#!/usr/bin/perl -pi
s/\t/ /;
will do what i want when a supply the files as arguments
from the commandline.
i have a script that traverse all directories from a
specfied starting point.
so when i recursively get to a new file i wish to detab that
file on the fly as if i had supplied the filename as an argument
sub recursion {
...
if (-f $specfile ) {
# detab code goes here
}
...
# next file/dir
}
is that possible still using the -i switch?
../allan