ã¤ã³ããã¯ã¹ã使ã£ãæå®è¡åãåºãããã°ã©ã (Pure Perl) 2010-08-10-1 [Programming][Algorithm] ããã¹ããã¡ã¤ã«ããæå®ããè¡ãåãåºãã¿ã¹ã¯ã«ã¤ãã¦ã é ããèµ°æ»ããæ¹æ³ ã¾ãã¯ãã¡ã¤ã«ã®é ããèµ°æ»ãã¦ãããã¤ã¼ããªæ¹æ³ã â ã³ã¼ãï¼getline-naive.plï¼ï¼ #!/usr/bin/perl use strict; use warnings; my $qidx = shift @ARGV; # start from 0 my $tgtfn = shift @ARGV; open(my $fh, "<", $tgtfn) or die; while (<$fh>) { next if $. != $qidx + 1; print; last; } close $fh; å é è¡ã¯0è¡ç®ã«ãªãä»æ§ã â å®è¡ä¾ï¼ % cat test.d
{{#tags}}- {{label}}
{{/tags}}