snip
> So I guess the question is -
>
> - is there a way in perl to authorize the callED perl script to have
> higher perms than the callING app's, so that it can write to the file I'm
> targeting?
>
> Or do I have to to this OUTSIDE of the perl script?
>
The short answer is that this is OS depen
On Sun, Jan 15, 2017, 16:19 wrote:
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 wro
> 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
Hi Alan
You are unpacking `@_` in a way, but perlcritic doesn't recognise doing it this
way.
I think you'd be better off without dereferencing the hash, and using a slice
to assign your local variables. I would write your subroutine like this
sub modrec {
my ($args) = @_;
Hi
Is that your real program, because it's rather odd?
The built-in variable `$@` holds the message from the latest error to be
trapped by `eval`, so since you have no `eval` blocks it will probably be
`undef`. Did you mean to assign the command-line parameter, like this?
my ($newdata) = @
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
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
On Sun, 15 Jan 2017 12:09:53 -0800
al...@myfastmail.com wrote:
> What's wrong with the way I'm unpacking the arguments passed to the
> subroutine,
>
> my %args = %{ shift @_ };
>
> Is there a different, recommended way?
Nothing's wrong. perlcritic does not this valid method, that's all.
Hi!
You forgot arrow operator
$args->{'FN'}, not $args{'FN'}
15.01.17 23:45, al...@myfastmail.com пишет:
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
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!
I think, you can use this aproach
sub modrec {
my ($args) = @_; # or my $args = shift @_; use what you like more
my $fn = $args->{'FN'};
}
15.01.17 23:09, al...@myfastmail.com пишет:
Hi,
I have a simple script with a subroutine that I pass scalar & array arguments
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
12 matches
Mail list logo