On Dec 18, 2007 1:05 AM, John W. Krahn <[EMAIL PROTECTED]> wrote:
snip
> > printf (
> > "%s from $s to %s duration %s %s\n",
snip
You missed the usage of $s instead of %s. I always get bitten by that.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [
On Monday 17 December 2007 15:40, [EMAIL PROTECTED] wrote:
>
> On Dec 17, 3:22 am, [EMAIL PROTECTED] (Pauld) wrote:
> >
> > my $var=0;my [EMAIL PROTECTED];
> > while ($var<$va_length)
> > {
> > print "${$daylistsorted[$var]}{TH} ";
> > print 'from ';
> > print ${$daylistsorted[$var]}{START};
> >
namotco wrote:
>
Let's say I want to search some text for "abc123". However, we know
people can make typos and so they could have entered avc123 or abc223 or
sbc123 or bc123 many other combinations...
So I want to search for those possibilities as well. So how would I go
about creating the pr
On Dec 17, 3:22 am, [EMAIL PROTECTED] (Pauld) wrote:
> my $var=0;my [EMAIL PROTECTED];
> while ($var<$va_length)
> {
> print "${$daylistsorted[$var]}{TH} ";
> print 'from ';
> print ${$daylistsorted[$var]}{START};
> print ' to '.${$daylistsorted[$var]}{END_DS};
> print " duration ";print int
On Dec 16, 2007 2:21 PM, namotco <[EMAIL PROTECTED]> wrote:
> Let's say I want to search some text for "abc123". However, we know
> people can make typos and so they could have entered avc123 or abc223
> or sbc123 or bc123 many other combinations...
> So I want to search for those possibilities as
On Dec 17, 2007 10:19 AM, ciwei2103 <[EMAIL PROTECTED]> wrote:
> Can somebody enlighten me what I'm doing wrong?
>
> I have a list in a file , "test.dat"
>
> sh> cat test1.dat
> 0039
> 0038
>
> sh> cat test1.pl
> #!/usr/bin/perl -w
> use strict;
> my $input = $ARGV[0];
>
> my @devices = <$input>
Maybe tell us what you are trying to do?
Try this:
> #!/usr/bin/perl -w
> use strict;
> my $input = $ARGV[0];
# File handle
my $FH;
# Check the file is a normal file and exists
die "File does not exist\n" if not -f $input;
# Open the file handle for read only, file named by $input
# Or die and
On 12/17/07, ciwei2103 <[EMAIL PROTECTED]> wrote:
> Can somebody enlighten me what I'm doing wrong?
> my $input = $ARGV[0];
>
> my @devices = <$input> ;
$input is a string, since it comes from @ARGV; but you're using it as
if it's a filehandle. Do you need open()? Hope this helps!
--Tom Phoen
Can somebody enlighten me what I'm doing wrong?
I have a list in a file , "test.dat"
sh> cat test1.dat
0039
0038
sh> cat test1.pl
#!/usr/bin/perl -w
use strict;
my $input = $ARGV[0];
my @devices = <$input> ;
print "devices = @devices \n";
__END__
now run it with
sh> test.pl test1.dat
Can
> However much depends on the actual data and the variations that you are
> expecting.
>
> If you are searching for words like those used in the English language
> then you may want to look at how spell checking software works.
>
Seems related to the algorithm like `find the longest common sub
seq
Seems it's related to a more general question stated as `Given 2
sequences, find longest common sub sequence'. Many algorithm books
have materials about this one.
-Todd
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
im importing data from an excel spreadsheet into an array of hashes.
the date is initially converted using Date::Format::Excel.
for this bit
{START} = unix start time .{START_DS} = string that I use to convert
to unixtime with
my $var=0;my [EMAIL PROTECTED];
while ($var<$va_length)
{
print "${$d
12 matches
Mail list logo