2007/7/6, Owen [EMAIL PROTECTED]:
#!/usr/bin/perl -w
use strict;
my %h = ();
my @one = ('abcd', 2567, 8908);
my @two = ('efgh', , );
%h = ($one[0] = [EMAIL PROTECTED]);
print $one[0] $h{$one[0]}-[1]\n;
%h = ($two[0] =
I'm getting the following when trying running the following code with
use strict; without it, it works fine.
#!/usr/bin/perl -w
use strict;
use warnings;
use Data::Dumper;
my (@data,@contents);
@data = STDIN;
push(@contents,map { [ split/:/,$_ ] if/^\w+/ } (sort @data) );
Brown, Rodrick wrote:
I'm getting the following when trying running the following code with
use strict; without it, it works fine.
#!/usr/bin/perl -w
use strict;
use warnings;
use Data::Dumper;
my (@data,@contents);
@data = STDIN;
push(@contents,map { [ split/:/,$_ ] if/^\w+/ } (sort
Jeff Pang wrote:
2007/7/6, Owen [EMAIL PROTECTED]:
#!/usr/bin/perl -w
use strict;
my %h = ();
my @one = ('abcd', 2567, 8908);
my @two = ('efgh', , );
%h = ($one[0] = [EMAIL PROTECTED]);
print $one[0] $h{$one[0]}-[1]\n;
%h
Thanks a lot...
It's my fault, a big mistake
Sorry, my $sta[0] is empty
Because of the variables passed by html link.
but when print to screen, I pass the right parameters.
so awful
Thanks again.
Sorry.
Best Regards,
xu
On 7 5 , 6 43 , [EMAIL PROTECTED] (Tom Phoenix)
On 7/5/07, Ray [EMAIL PROTECTED] wrote:
I want to try to construct
the arguments for GetOptions, but in a dynamic way. So, instead of
hard-coding my switches, like this:
GetOptions (
showlog = \$MyArgs{showlog},
'strategy=s' = \$MyArgs{strategy}
)
like is shown in the
[EMAIL PROTECTED] schreef:
I wrote a simple perl script and execute it as follows: ./sr /tmp/*
#!/usr/bin/perl
print $ARGV[0];
Well, what is returned is the first filename in the directory, instead
of the actual argument itself. What can I do to get the literal
argument?
That is a
Chas Owens wrote:
On 7/5/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
I am reading perldoc.perl.org and am not understanding exit and die
clearly.
If I have a conditional in a sub that I want to validate with, what is
the correct way to do the following:
1. End the sub and return
Running Perl on WinXP
I would like to read the subdirectories and their respective files, that
I have on my F: drive. They are arranged hierarchically, with a
directory for each year, each of which contains a directory for each
month, each of which contains files named for days. Like this:
F:
On Jul 6, 2:11 am, [EMAIL PROTECTED] (Joseph L. Casale) wrote:
I am reading perldoc.perl.org and am not understanding exit and die clearly.
If I have a conditional in a sub that I want to validate with, what is the
correct
way to do the following:
1. End the sub and return back to
Monty wrote:
I've come across the following bit of code:
print PIPE This is line number $_\n and $count++;
This will only increment $count if print returned a true value.
How does this differ from:
print PIPE This is line number $_\n;
$count++;
This will always increment $count.
What
Thanks. I was vaguely aware of modules that would do this. Doing it by
hand at first is a good learning exercise for me.
I can indeed check to see if the thing I'm looking at is a directory.
But why does it do this? Can you help me understand why when I think I
am in one directory, my script
On Jul 5, 8:48 pm, [EMAIL PROTECTED] (Lakshmi Sailaja)
wrote:
Hi,
I will have to login as a super user and run some commands.
I want to automate the following through Perl:
su - user
and provide password
check if the login is successful or not.
Can you please let me know?
I Expect you
I've come across the following bit of code:
print PIPE This is line number $_\n and $count++;
How does this differ from:
print PIPE This is line number $_\n;
$count++;
Thanks!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 7/6/07, Zielfelder, Robert [EMAIL PROTECTED] wrote:
When I use Firefox to display/run the
script everything works as it should. When I use IE I get a
blank page.
At least you didn't crash IE!
print _END_OF_TEXT_
{ oodles of HTML omitted }
@page
{ still more oodles of HTML
Hi,
I would like to create module of common sub routines and corresponding
global variables. I'm trying to use use and/or require but it
looks like I have to do extra coding to make variables defined in my
module file to be accessible to the .pl files that are using the
module file. Can someone
On 7/6/07, Ray [EMAIL PROTECTED] wrote:
I would like to create module of common sub routines and
corresponding global variables.
That's how most modules start; you're on the right track.
I'm trying to use use and/or require but it
looks like I have to do extra coding to make variables
17 matches
Mail list logo