Date: Sat, 04 Feb 2006 18:31:45 +0100 From: Kristian Vaaf <vaaf@broadpark.no> To: adamnealis@yahoo.co.uk Cc: questions@freebsd.org Subject: Re: Script to generate names Message-ID: <7.0.1.0.2.20060204183041.02101d28@broadpark.no> In-Reply-To: <43E4D2B6.50509@yahoo.co.uk> References: <7.0.1.0.2.20060203110425.01744328@broadpark.no> <43E4D2B6.50509@yahoo.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
At 17:13 04.02.2006, Adam Nealis wrote: >That's going to ba a large file of mixed words! > >Would be faster in perl than in the shell. Put the below in a file, >and run it like this: > >perl myfile.pl > myListOfMixedWords > >#!/usr/bin/perl > >use warnings; >use strict; > >my @custw; >my @dictw; >my $cw; >my $dw; >my $i; > >open F1, "web2.head-100"; >open F2, "web2.tail-100"; > >while ( chomp ( $custw[$i++] = <F1> ) ) { } > >$i=0; >while ( chomp ( $dictw[$i++] = <F2> ) ) { } > >foreach $cw ( @custw ) { > foreach $dw ( @dictw ) { > print "$cw$dw\n"; > print "$dw$cw\n"; > } >} I'm not sure man, I think Perl is a bit overkill. Besides if I were to use it, that mean that I'd have to learn it. And I think I'd rather learn Ruby if I were to do that high level stuff. Thanks a lot though! :) All the best, Kristian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7.0.1.0.2.20060204183041.02101d28>