summaryrefslogtreecommitdiffstats
path: root/scripts/xauth.pl
diff options
context:
space:
mode:
authorAilin Nemui2015-02-02 14:02:20 +0100
committerAilin Nemui2015-02-02 14:02:20 +0100
commit0816da664099746d962ee06b7de71be7c570e069 (patch)
tree8955895edd0432da036782d67aa253079b003ca8 /scripts/xauth.pl
parenta457c0a97058fadf1b84247efd16176989412bc9 (diff)
downloadscripts.irssi.org-0816da664099746d962ee06b7de71be7c570e069.tar.bz2
Localise the $/ special variable.
Follow-up to #129 to fix all $/ inside the scripts archive. Also fix dejunk to not break scripts using the assumed default. Note, other scripts like cmpchans might still break your scripts due to the global nature of the Perl.
Diffstat (limited to 'scripts/xauth.pl')
-rw-r--r--scripts/xauth.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/xauth.pl b/scripts/xauth.pl
index 430500d..c4b13c0 100644
--- a/scripts/xauth.pl
+++ b/scripts/xauth.pl
@@ -362,7 +362,7 @@ sub read_users() {
# and then we read the userfile.
# apparently Irssi resets $/, so we set it here.
- $/ = "\n";
+ local $/ = "\n";
while( my $line = <XUSERS>) {
if( $line !~ /^(#|\s*$)/ ) {
my ($nick, $ircnet, $password) =
@@ -435,7 +435,7 @@ sub read_chans() {
# and then we read the channelfile.
# apparently Irssi resets $/, so we set it here.
- $/ = "\n";
+ local $/ = "\n";
while( my $line = <NICKCHANS>) {
if( $line !~ /^(#|\s*$)/ ) {
my ($channel, $ircnet) =