schms wrote:
I am trying to run the following system() command. It seems as Perl is
not able to handover $POLICYNAME
to the Unix shell
It *looks* like you are trying to hand over $POLICYNAME to
/usr/openv/netbackup/bin/admincmd/bpplinfo and not to the shell.
Whether or not system() invokes a
> "jshock" == jshock <[EMAIL PROTECTED]> writes:
jshock> For example:
jshock> my %weekdays = (
jshock> 0 => "SUN",
jshock> 1 => "MON",
jshock> 2 => "TUE",
jshock> 3 => "WED",
jshock> 4 => "THU",
jshock> 5 => "FRI",
jshock> 6 => "SAT",
j
Rob Dixon schreef:
> Dr.Ruud:
>> perl -le'
>> #!/usr/bin/perl
>> use strict;
>> use warnings;
>>
>> my @n2d = qw( SUN MON TUE WED THU FRI SAT );
>> my %d2n; @d2n{ @n2d } = ( 0 .. $#n2d );
>>
>> print $d2n{ WED };
>> '
>> 3
>
> It doesn't help to write UNIX shell commands when we are talk
Rob Dixon wrote:
Dr.Ruud wrote:
perl -le'
#!/usr/bin/perl
use strict;
use warnings;
my @n2d = qw( SUN MON TUE WED THU FRI SAT );
my %d2n; @d2n{ @n2d } = ( 0 .. $#n2d );
print $d2n{ WED };
'
3
It doesn't help to write UNIX shell commands when we are talking about a
cross-platform l
On Mon, May 19, 2008 at 6:21 AM, schms <[EMAIL PROTECTED]> wrote:
snip
> while () {
snip
you need a chomp here
snip
>my $POLICYNAME = $_;
>
>my @args = ("/usr/openv/netbackup/bin/admincmd/bpplinfo
> $POLICYNAME -modify -inactive");
snip
this is a pointless use of an array with on
Dr.Ruud wrote:
> jshock schreef:
>> For example:
>>
>> my %weekdays = (
>> 0 => "SUN",
>> 1 => "MON",
>> 2 => "TUE",
>> 3 => "WED",
>> 4 => "THU",
>> 5 => "FRI",
>> 6 => "SAT",
>> );
>> $weekdays{2}; # gives "TUE"
>>
>> But what if I know "TUE" and want to find out what the key is? Is
>> there a c
jshock wrote:
>
> For example:
>
> my %weekdays = (
> 0 => "SUN",
> 1 => "MON",
> 2 => "TUE",
> 3 => "WED",
> 4 => "THU",
> 5 => "FRI",
> 6 => "SAT",
> );
All those double quotes without any interpolation?
my %weekdays;
@weekdays{0..6}= qw/SUN MON T
jshock schreef:
> For example:
>
> my %weekdays = (
> 0 => "SUN",
> 1 => "MON",
> 2 => "TUE",
> 3 => "WED",
> 4 => "THU",
> 5 => "FRI",
> 6 => "SAT",
> );
> $weekdays{2}; # gives "TUE"
>
> But what if I know "TUE" and want to find out what the key is? Is
> there a construct like $weekdays{"TUE"}
> -Original Message-
> From: jshock [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 19, 2008 07:20
> To: beginners@perl.org
> Subject: How do I find the key of a specific hash element?
>
> For example:
>
> my %weekdays = (
> 0 => "SUN",
> 1 => "MON",
> 2 => "TUE",
>
For example:
my %weekdays = (
0 => "SUN",
1 => "MON",
2 => "TUE",
3 => "WED",
4 => "THU",
5 => "FRI",
6 => "SAT",
);
$weekdays{2}; # gives "TUE"
But what if I know "TUE" and want to find out what the key is? Is
there a construct like $weekd
I am trying to run the following system() command. It seems as Perl is
not able to handover $POLICYNAME
to the Unix shell and that the shell gets a problem with the strings -
modify and -inactive as they contain a minus (-). Is there a way to
run the command
/usr/openv/netbackup/bin/admincmd/bppli
Pat Rice wrote:
I'm trying to achieve the following
a table that when I click on the top link I will chance the ORDER BY
value in the table. eg
|fruit | boxes |
|orange | 10|
|apples | 5 |
so if fruit was a link and I clicked it I would change my select
statement to order by fruit, if
Is there an algorithm to scale text on a graphic? I have a badge 200x200
that I would like to scale text on.
I have looked at a bunch of Perl image libraries ( o_O ) but I didn't
see an example.
Robert
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTE
From: "Rob Dixon" <[EMAIL PROTECTED]>
Yes, I'm afraid I misquoted the entry from perlfaq7, which actually
recommends
=begin comment
:
=end comment
=cut
which is clumsy, to say the least. However I use
=begin comment
:
=cut
which works fine, and I don't think contravenes POD syntax except t
Octavian Rasnita wrote:
>
> From: "Rob Dixon" <[EMAIL PROTECTED]>
>>
>> The documentation that John referred you to recommends
>>
>> =begin comment
>>:
>> =end
>>
>> Which may be a trifle awkward, but I'm sure there are worse things that
>> happen
>> to you in your day. It takes less than a
From: Richard Lee
> ok so let's say on SERVERK, I cannot install any modules(no root
access
> and different compilers, gcc(I have tried perlgcc but to no success),
> and other
> reasons that I cannot explain nor understand and after numerous
> attempts(installing my own dir and others), I have g
Matthew Whipple wrote:
That would depend upon which side that command was executed. Keep in
mind that he had mentioned a script that would iniate the SSH connection
from the Solaris computer and could retrieve data from that computer
which could then be passed over the connection.
I unfortuna
Octavian Rasnita wrote:
From: "Rob Dixon" <[EMAIL PROTECTED]>
The documentation that John referred you to recommends
=begin comment
:
=end
Which may be a trifle awkward, but I'm sure there are worse things
that happen
to you in your day. It takes less than a second to type, and if you do
hi all
I'm trying to achieve the following
a table that when I click on the top link I will chance the ORDER BY
value in the table. eg
|fruit | boxes |
|orange | 10|
|apples | 5 |
so if fruit was a link and I clicked it I would change my select
statement to order by fruit, if I clicked o
From: "Rob Dixon" <[EMAIL PROTECTED]>
The documentation that John referred you to recommends
=begin comment
:
=end
Which may be a trifle awkward, but I'm sure there are worse things that
happen
to you in your day. It takes less than a second to type, and if you do it
a lot
you could set
On Mon, 2008-05-19 at 22:08 +0800, Jeff Peng wrote:
> On Mon, May 19, 2008 at 10:01 PM, Matthew Whipple
> <[EMAIL PROTECTED]> wrote:
> >
> > It sounded as though he wanted to run the script on the Linux machine,
> > not the server...
>
> That was maybe not correct.
> Given the case that he say so
On Mon, May 19, 2008 at 10:01 PM, Matthew Whipple
<[EMAIL PROTECTED]> wrote:
>
> It sounded as though he wanted to run the script on the Linux machine,
> not the server...
That was maybe not correct.
Given the case that he say something like this in his script:
open $pwd, "/etc/passwd" or die $!;
On Mon, May 19, 2008 at 12:48 AM, yitzle <[EMAIL PROTECTED]> wrote:
> See:
> http://search.cpan.org/~petdance/WWW-Mechanize-1.34/lib/WWW/Mechanize.pm#$mech-%3Ecredentials(_$username,_$password_)
>
> $mech->credentials( $username, $password )
>
See also the example uses of WWW::Mechanize:
http://se
On Mon, 2008-05-19 at 21:55 +0800, Jeff Peng wrote:
> On Mon, May 19, 2008 at 11:22 AM, Richard Lee <[EMAIL PROTECTED]> wrote:
>
> > I have thought of writing a simple shell script which launchs a (from
> > SERVERK)ssh session into linux machines using user name with initial script
> > to run a p
On Mon, May 19, 2008 at 11:22 AM, Richard Lee <[EMAIL PROTECTED]> wrote:
> I have thought of writing a simple shell script which launchs a (from
> SERVERK)ssh session into linux machines using user name with initial script
> to run a perl script and logs off..
Is this possible? I don't think so.
Bob Cohen schreef:
> It's just
> that I'm getting hammered with spam and spamassassin and amavisd-new
> seem to want a newer version of perl for some of the necessary and
> optional perl modules. :-( Otherwise, I'd happily like the old
> version.
Why don't you put that functionality on a box of
26 matches
Mail list logo