horiz_scroll

Anonymous

Can't see this entire snippet since you can't scroll horizontally!

1
2
3
4
5
6
7
8
#!/usr/bin/perl
@a = <STDIN>;
$j = join('', @a);
$cn = 1;
while ($j =~ m;var [ ]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*([a-zA-Z][a-zA-Z0-9]{8}([a-zA-Z0-9])[a-zA-Z0-9]*([a-zA-Z0-9])[a-zA-Z0-9]{3})[ \n]*[\;,=];g) {
     printf "o%s%s%3.3d %s\n", $3, $2, $cn, $1;
    $cn++;
}

vs.

    #!/usr/bin/perl
    @a = <STDIN>;
    $j = join('', @a);
    $cn = 1;
    while ($j =~ m;var [ ]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*[a-zA-Z][a-zA-Z0-9]*[ \n]*[,][ \n]*([a-zA-Z][a-zA-Z0-9]{8}([a-zA-Z0-9])[a-zA-Z0-9]*([a-zA-Z0-9])[a-zA-Z0-9]{3})[ \n]*[\;,=];g) {
         printf "o%s%s%3.3d %s\n", $3, $2, $cn, $1;
        $cn++;
    }

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks