#!/usr/bin/perl -w use strict; @ARGV = qw(/usr/dict/words); my $longest = ''; while (<>) { chomp; next unless length > length $longest; if (length == tr/qwertasdfgzxcvb/qwertasdfgzxcvb/) { $longest = $_; } } print $longest;
In reply to Re: character classes
by chromatic
in thread charachter classes, and a misunderstanding...
by eduardo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |