summaryrefslogtreecommitdiffstats
path: root/scripts/urlgrab.pl
diff options
context:
space:
mode:
authorDavid Leadbeater2015-01-10 17:26:59 +0000
committerDavid Leadbeater2015-01-10 17:26:59 +0000
commit1bae3cffef57d4d46d0230aa4f44cc52c7671b93 (patch)
tree03d3b85d868a72a6b162c7dca8ea7c0173510618 /scripts/urlgrab.pl
parent6fa0cda4b3f7d54d5835fe580795e4f35980cc28 (diff)
parent55e10f5aeb6d0559518623a432263d4a73d7614b (diff)
downloadscripts.irssi.org-1bae3cffef57d4d46d0230aa4f44cc52c7671b93.tar.bz2
Merge pull request #83 from obfuscoder/perlcritic-s-z
Fix perlcritic issues for all scripts starting with s to z
Diffstat (limited to 'scripts/urlgrab.pl')
-rw-r--r--scripts/urlgrab.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/urlgrab.pl b/scripts/urlgrab.pl
index 1fd657f..00b0c64 100644
--- a/scripts/urlgrab.pl
+++ b/scripts/urlgrab.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl -w
+use strict;
use Irssi 20010120.0250 ();
+use vars qw($VERSION %IRSSI);
$VERSION = "0.2";
%IRSSI = (
authors => 'David Leadbeater',
@@ -10,7 +12,6 @@ $VERSION = "0.2";
url => 'http://irssi.dgl.cx/',
);
-use strict;
my $lasturl;
# Change the file path below if needed
@@ -50,7 +51,7 @@ sub url_log{
my($where,$channel,$url) = @_;
return if lc $url eq lc $lasturl; # a tiny bit of protection from spam/flood
$lasturl = $url;
- open(URLLOG, ">>$file") or return;
+ open(URLLOG, ">>", $file) or return;
print URLLOG time." $where $channel $lasturl\n";
close(URLLOG);
}