Hi,
I have a file of several million words, 80% of which are misspelled
(i.e. non-words) and 20% of which are spelled correctly. I would like
to write a short script to read in this file and output only the
correctly spelled words.
Since I'm on Unix, I could just use something like `spell` to
> shot in the light ;-)
>
> The tables are built at compile time, so if you want to use variables
> here you will need to use string eval.
>
> eval "tr/$lettertochange/$lettertochangeto/";
Does this mean that I have to use $_ for such a translation, or is
there a way to modify a string inside a
> You need to quotemeta() the string so it can be used literally in
> a regex.
>
> >The line that I'm looking in is (almost) such as: $original_ip_address =
> >deny+qfe1+tcp+*-*+0.0.0.0
> >(can ya guess this is a firewall packet screen?)
> >
> >The syntax I'm using is:
> >
> >if ($looking_for =
Pedro,
On Tue, 21 Aug 2001, Pedro A Reche Gallardo wrote:
> Hi All, I have a file (see below) that I would like to split in three
> files: One file for the information under "Alignment (DIALIGN
> format)", another for the information under the line "Alignment (FASTA
> format)" and a third o
On Sat, 28 Jul 2001, Jeff 'japhy/Marillion' Pinyan wrote:
> On Jul 28, Dan Grossman said:
>
> >#!/usr/bin/perl -w
> >use strict;
> >
> >my $funcRef = \&otherDummyFunc;
> >
> >sub callTheReferredFunc {
> >my $returnVal = &$f
Hi,
I'm wondering why Perl doesn't complain about the following code:
--
#!/usr/bin/perl -w
use strict;
my $funcRef = \&otherDummyFunc;
my $oneVar = &callTheReferredFunc();
print $oneVar;
sub dummyFunc {
return 42;
}
sub otherDummyFunc {
return "your mom";
}
sub callTheReferr
On Fri, 27 Jul 2001, Akshay Arora wrote:
> $line =~ s/(\w)(\S*)/\u$1$2/g;
Wow, I've never seen this "\u" before. I can't find it anywhere in
the Perl documentation. Is there a list of interesting regexp
modifiers like this somewhere that I've been missing?
Thanks,
Daniel
--
To unsubscribe,
On Thu, 26 Jul 2001, Bob Bondi wrote:
> Probably not a Perl bug, but this is so confusing I' probably
> enter it as a bug
>
> Given the script below and the fact that you run it like:
> > perl foo.pl -p 10.0.0.1 -s 8080 -t SOS
>
> what would you expect the output to be?
>
> use strict;
On Thu, 26 Jul 2001, Birgit Kellner wrote:
>
> I'm thinking of coding a KWIC search through a text. The user chooses a
> search string and a horizon, meaning that output is to contain $i words to
> the left and to the right of the search string (if found).
>
> This is the code I have so far:
>
Terribly sorry if this gets posted twice ...
On Tue, 24 Jul 2001, Mark Byerley wrote:
> Good Morning/Afternoon to all
>
> I need some error checking (or rather field validation) within my script
> itself to ensure a date field coming across on a form is in the format of
> dd-mm-. I would rat
Hello,
I'm hoping someone can help me with an INET Socket question. I have
the following socket setup and subroutine to receive data from a
Server:
# connection protocol
if ($port =~ /\D/) { $port = getservbyname($port, 'tcp') }
die "No port" unless $port;
$iaddr = inet_aton($remote)
11 matches
Mail list logo