Skip to main content



Nicholas Clark is in town, this calls for an emergency social! Join us tomorrow at The Kernel Tap Room.


Emergency Social
Starts: Thursday August 21, 2025 @ 6:00 PM GMT+01:00 (Europe/London)
Finishes: Thursday August 21, 2025 @ 10:30 PM GMT+01:00 (Europe/London)
Nicholas Clark is in town, this calls for drinks!
Location: The Kernel Brewery Tap RoomArch 7 Spa RoadBermondsey SE1 6 3AE

ilmari reshared this.



Aug 21
Emergency Social
Thu 5:00 PM - 9:30 PM The Kernel Brewery Tap Room Arch 7 Spa Road Bermondsey SE1 6 3AE
London Perl Mongers
Nicholas Clark is in town, this calls for drinks!

London Perl Mongers reshared this.









I was using my $tmp = glob("file20240101.*") to find the full filename regardless of the extension(I knew there was only one of each file), when I found glob was alternating between working and failing

Rendering it as my ($tmp) = glob("file20240101.*") fixed the problem, but I'm wondering why, If it was going to go wrong I'd have thought treating glob's list in a scalar context would return the number of elements in the list

#!/usr/bin/perl
use warnings;
use strict;

for (1..4) {
my $tmp = glob($0);
print "$_ $tmp\n";
}
print "###\n";
for (1..4) {
my ($tmp) = glob($0);
print "$_ $tmp\n";
}

Output:
1 glob.pl
Use of uninitialized value $tmp in concatenation (.) or string at glob.pl line 7.
2
3 glob.pl
Use of uninitialized value $tmp in concatenation (.) or string at glob.pl line 7.
4
###
1 glob.pl
2 glob.pl
3 glob.pl
4 glob.pl

submitted by /u/octobod
[link] [comments]