[Linux-disciples] Perl: displaying the part of a match that failed

Adam Rosi-Kessel adam at rosi-kessel.org
Fri Jun 24 15:10:53 EDT 2005


On Fri, Jun 24, 2005 at 01:48:09PM -0400, Stephen R Laniel wrote:
> If a stylesheet file doesn't match the regex, I'd like Perl
> to display for me the part of the file that failed to match.
> Is this possible?

Eh?

print $_ unless (m/$block/);

??
-- 
Adam Rosi-Kessel
http://adam.rosi-kessel.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050624/9d9ebbc9/attachment.pgp


More information about the Linux-disciples mailing list