3 ms·
Bah! Perl is 5.8.8. That was released back in 2006. Still, it works. I got a chance to see the code that others were running: #!/usr/bin/perl
by Ovid 14y ago
Bah! Perl is 5.8.8. That was released back in 2006. Still, it works. I got a chance to see the code that others were running:
#!/usr/bin/perl
use File::Find;
my @found;
find(
sub {push @found => $File::Find::name if -f $_},
'.'
);
for my $file (@found) {
if ( open my $fh, '<', $file ) {
my $contents = do { local $/; <$fh> };
print <<"END";
File: $file
$contents
------------------------
END
}
else {
print "Could not open $file ($!)\n";
}
}
Update: all things considered, seeing people trying to run the following code doesn't increase my faith in humanity:
#!/bin/bash
mv $0 "8======D~~~~"
- peachlover 14y ago#!/bin/bash echo "Orly" cat /tmp/* hmm im new here and i cant use astrisk in comment ?
- icebraining 14y agoAsterisks are used for formatting. See https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc
- Ovid 14y agoOoh, and here's this little C++ gem someone just posted: #include <iostream> using namespace std; int main() { system("rm -rf /etc"); return 0; }