in reply to In-place editing of files

Is this anywhere close? $ perl -pi.bak -e'substr($_,index $_,q/"/) =~ s/\s+//g' file.txt Think of a better sed :-)

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: In-place editing of files
by Aristotle (Chancellor) on Sep 20, 2004 at 20:28 UTC

    The OP says

    I need to remove whitespace from the name that is in between the quotes.

    So it would have to be

    $ perl -pi.bak -e'substr($_,index $_,q/"/) =~ s/\s+//g if /^\s+Tag\s*{ +/ .. /^\s+}/ and /^\s+Name\b/' file.txt

    Makeshifts last the longest.