Hi,
I have a simple script with a subroutine that I pass scalar & array arguments
to,
#!/usr/bin/perl
use 5.01201;
use strict;
use warnings;
my $this_fn = "input.txt";
my @this_dr = qw(
/path/1
/path/2
);
my $t
Hi
On Sun, Jan 15, 2017, at 12:23 PM, Илья Рассадин wrote:
> I think, you can use this aproach
If I use either of those
sub modrec {
- my %args = %{ shift @_ };
+ my ($args) = @_;
30 my $fn = $args{FN};
Hi,
On Sun, Jan 15, 2017, at 01:01 PM, Shawn H Corey wrote:
> > Is there a different, recommended way?
>
> Nothing's wrong. perlcritic does not this valid method, that's all.
>
> TIMTOWTDI (There Is More Than One Way To Do It.)
Hm, ok. As long as it's not wrong/broken in some weird way.
I kep
I have an application that calls a perl script, feeding it input over STDIN.
The perl script takes that input, processes it, and writes is as a change to an
output file.
I use Path::Tiny, and this works ok,
use Path::Tiny qw(path);
my $newdata = $@;
$newdata = (some pro
> Is that your real program
Close, but copied from my (changing) notes, not from the actual code. See
below.
> but changing something to the same data amounts to it being *unchanged*,
> surely?
Nope. Not using Path::Tiny.
I found the info I need buried a further donw on its webpage. Appare
For my domain, I retrieve its DNS A-records from a local nameserver using
/usr/bin/dig -t A @192.0.2.1 -k /etc/named/keys/T.key +noadditional
+dnssec +multiline +norecurs example.com
In my perl script, I can do the same using system()
system( "/usr/bin/dig", "-t", "A", "\@192.0.