summaryrefslogtreecommitdiffstats
path: root/scripts/dau.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/dau.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/dau.pl')
-rw-r--r--scripts/dau.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dau.pl b/scripts/dau.pl
index 6b959c0..89a6623 100644
--- a/scripts/dau.pl
+++ b/scripts/dau.pl
@@ -2686,7 +2686,7 @@ sub switch_cool {
} elsif ($style eq 'suffixes') {
my $suffix;
if (-e $file && -r $file) {
- $/ = "\n";
+ local $/ = "\n";
@ARGV = ($file);
srand;
rand($.) < 1 && ($suffix = switch_parse_special($_, $channel)) while <>;