diff options
| author | Dave Cross <d.cross@fairfx.com> | 2019-10-21 08:33:47 +0100 |
|---|---|---|
| committer | Dave Cross <d.cross@fairfx.com> | 2019-10-21 08:33:47 +0100 |
| commit | e585e9069012f0126f0b1ea39b71e014407f2fef (patch) | |
| tree | 195b2cdb9fa748d9b2399a9f46fde35ac1137d62 /challenge-031/dave-cross | |
| parent | 1040bc1893cb03db5f65f1d506d8075f98bf4e60 (diff) | |
| download | perlweeklychallenge-club-e585e9069012f0126f0b1ea39b71e014407f2fef.tar.gz perlweeklychallenge-club-e585e9069012f0126f0b1ea39b71e014407f2fef.tar.bz2 perlweeklychallenge-club-e585e9069012f0126f0b1ea39b71e014407f2fef.zip | |
Challenge #031 / Task =2
Diffstat (limited to 'challenge-031/dave-cross')
| -rw-r--r-- | challenge-031/dave-cross/perl5/ch-2.pl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/challenge-031/dave-cross/perl5/ch-2.pl b/challenge-031/dave-cross/perl5/ch-2.pl new file mode 100644 index 0000000000..de21aa658f --- /dev/null +++ b/challenge-031/dave-cross/perl5/ch-2.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +# Because this is *literally* the point of this code +no strict 'refs'; + +use File::Basename; + +my $varname = shift + or die "Usage: ", basename($0), " variable-name\n"; + +# Set that variable +$$varname = int rand 256; + +# Print the variable +print "The variable is called $varname and it has the value $$varname\n"; |
