Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Perl: clearing $1

Name: Anonymous 2009-03-02 5:35

I've got a little Perl script does a series of regexs and the $1 sometimes carries over if there is no match because of an error. I came up with the following kludge, but there should be a better way to reset the $1.

while ($file = shift) {
    $file =~ /\[([0-9A-F]{8})\]/;
    $sum1 = $1;
...
    $bogus = "FAIL";
    $bogus =~ /(FAIL)/;

    $sum2 = `cksfv "$file" 2>/dev/null | grep -v "^;"`;
    $sum2 =~ /([0-9A-F]{8})$/;
    $sum2 = $1;

    if ($sum1 eq $sum2) {
...

Name: Anonymous 2009-03-03 7:00

Ignore >>5, he's just another Perl "programmer" doing everything in his power to make the code COMPLETELY FUCKING UNREADABLE.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List