use strict; while(<DATA>){ ~s/copyright\s+(\d+)-(\d+),\s+(\d+)/copyright $1-$3/i; print; } __DATA__ Given a string like "copyright 1990-2000, 2001. All rights reserved .. +. OUTPUT: Given a string like "copyright 1990-2001. All rights reserved ...
In reply to Re: modifying list of numbers
by JamesNC
in thread modifying list of numbers
by jc23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |