All pastes #949899 Raw Edit

Untitled

public text v1 · immutable
·published 2008-03-20 03:47 UTC
rendered paste body
#! /usr/bin/perl -w
use strict;
## November 15, 2006
## Daniel Vredenburg (Vredfreak)
## This is a program that checks for package updates for Arch Linux users.

open (MYINPUTFILE, "/home/ju143558/.scripts/arch-updates/updates.log") or die "No such file or directory: $!";

my $i = 0;
while(<MYINPUTFILE>)
{
        if (/^(.*)\/(.*)(\..*\..*\.)/)  {
                #print " \n";
                $i++;
        }

}
if ($i == 0) {
        print "up to date";
} else {
        print "available ($i)";
}
close(MYINPUTFILE);