I am working on a bit of a issue and I am hoping to find some
guidance.
Here is what I need to to:
I need to generate 2 SHA1 hashes (easy) based on an objects name and
it's DB id.
This is Easy so far and I have that down. I get 2 unique SHA1 hashes
stored.
Now depending on what I am doing I onl
[EMAIL PROTECTED] schreef:
> How would I make something that would automatically open the correct
> ports for a certain machine without my having to be at the machine
> goto 192.168.1.1 in a browser and open the ports manually? Can this be
> done easily?
Best configure the router's DHCP to (for e
On Mon, 6 Aug 2007, Ken Foskey wrote:
On Sun, 2007-08-05 at 18:26 +0100, Jorge Almeida wrote:
It sounds like you want something similar to parameter handling,
generally this works on escalating files. eg /etc/myprog overridden by
~/.myprog overrridden by a specific options file and so on.
T
Amichai Teumim wrote:
I get:
Not enough arguments for index at obj13-lib.pl line 11, near "index)"
Compilation failed in require at obj13-1.pl line 6.
What is this index error?
Go to line 11 in obj13-lib.pl and check its syntax.
--
Just my 0.0002 million dollars worth,
Shawn
"For the
Rodrigo Tavares schreef:
> Write a program than user type five digits,
> separates the individual digits of number, and print
> the five digits time five, the four digit four times,
> thus for ahead.
#!/usr/bin/perl
use strict;
use warnings;
my $n = 5; # number-of-digits
print
"Mr. Shawn H. Corey" schreef:
> To determine if a module is already installed on your machine:
>
> *NIX: perl -M -e ''
> DOS: perl -M -e ""
>
> Example: perl -MCGI -e ''
>
> If it doesn't complain, it's installed.
Alternative:
perl -Mstrict -MCGI -wle 'print $CGI::VERSION'
--
Affijn,
On 8/6/07, Ken Foskey <[EMAIL PROTECTED]> wrote:
>
> I have a script that must update the reconciliation system using a
> module.
>
> >From a design perspective how safe is it to use DB2 updates in an END
> block?
snip
They are fairly safe since this is pretty much what they were designed
for. Th
On 8/6/07, vishnu <[EMAIL PROTECTED]> wrote:
> hi,
> VMware while starting uses an exec call to execute its own version of
> perl (5.005), But i need to use XML-RPC which does not come with VMware.
> When i try to import or use XML-RPC like (require RPC::XML;) i got an error
> saying the .pm fi
On Aug 6, 11:03 am, [EMAIL PROTECTED] (Irfan Sayed) wrote:
> #!/usr/atria/bin/Perl
> use strict;
> use warnings;
>
> # Subroutine prototypes
> join_proj();
> rebase();
> deliver();
> quit();
These are not subroutine prototypes. You are calling each one of
those four subroutine
On 8/6/07, Ken Foskey <[EMAIL PROTECTED]> wrote:
>From a design perspective how safe is it to use DB2 updates
> in an END block?
Pretty darn safe.
But that's like asking how safe it is to cross the street, isn't it?
Usually it's pretty safe, if you take some basic precautions and
expect it to fa
On 8/6/07, Sydney <[EMAIL PROTECTED]> wrote:
> The script working fine. but I like to save output of "$avar="$dir/
> $db" into a file. How do I do that? Thanks LC
>
>
> print "which client\n";
> my $a = <>;
> chomp $a;
> my $db = <>;
> chomp $db;
> my $dir="/u1/data/$a";
> my $avar="$dir/$db";
> $
On 8/6/07, Amichai Teumim <[EMAIL PROTECTED]> wrote:
snip
> sub sumIt{
> my $total;
> $total += $_ for @_;
> warn "@_ was empty, total undefined!\n" if !defined $total;
> }
snip
This will return nothing useful. You need a return statement after the warn.
> sub avg(@)
> {
> my @arr = @_;
> m
I just renamed it to obj13-1.pl from script.pl
So it looks now like this:
#!/usr/bin/perl
use strict;
use warnings;
require 'obj13-lib.pl';
my @userArray = ;
my $sum = sumIt(@userArray);
print $sum;
and the library I renamed to: obj13-lib.pl and now looks like this:
sub sumIt{
my $total;
No it was commented out. Now it's changed. I still don't know how to use
it. What would a good way to test it be?
echo 1234 | ./script.pl obviously won't do much. I wad told
./obj13-1.pl < Paul Lalli wrote:
>> Yes, it would have, if that's what you had. But you didn't. You had
>> the line:
>> #
-Original Message-
>From: "Sayed, Irfan (Irfan)" <[EMAIL PROTECTED]>
>Sent: Aug 6, 2007 11:03 AM
>To: beginners@perl.org
>Subject: Error in executing the script
>
>Hi All,
>
>I have following script
>
>#!/usr/atria/bin/Perl
>use strict;
>use warnings;
>
># Subroutine prototypes
>
Remove the tab or spaces before the EOT label. It must be the only thing
on that line.
Bob McConnell
> -Original Message-
> From: Sayed, Irfan (Irfan) [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 06, 2007 11:03 AM
> To: beginners@perl.org
> Subject: Error in executing the script
>
>
Hi All,
I have following script
#!/usr/atria/bin/Perl
use strict;
use warnings;
# Subroutine prototypes
join_proj();
rebase();
deliver();
quit();
# Define the actions to take
my %action_to_take = (
'1' => \&join_proj,
'2' => \&rebase,
'3' =
On 6 Aug 2007 at 12:50, Rob Dixon wrote:
> Dermot Paikkos wrote:
> >
> > CGI;
> > Mime::Lite;
> >
> > I am trying to take the input from a text field from a html page and
> > send it as an email. The text contains a UK sterling £ sign. It looks
> > fine on in the html page but when I send the mail
On Aug 6, 9:03 am, [EMAIL PROTECTED] (Mr. Shawn H. Corey) wrote:
> Paul Lalli wrote:
> > Yes, it would have, if that's what you had. But you didn't. You had
> > the line:
> > #require 'lib.pl'
>
> > That is, you had the line commented out. A commented out line does
> > nothing at all.
>
> > Paul
I have a script that must update the reconciliation system using a
module.
>From a design perspective how safe is it to use DB2 updates in an END
block?
--
Ken Foskey
FOSS developer
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.p
On Aug 6, 9:03 am, [EMAIL PROTECTED] (Mr. Shawn H. Corey) wrote:
> Paul Lalli wrote:
> > Yes, it would have, if that's what you had. But you didn't. You had
> > the line:
> > #require 'lib.pl'
>
> > That is, you had the line commented out. A commented out line does
> > nothing at all.
>
> > Paul
Amichai Teumim wrote:
No it was commented out. Now it's changed. I still don't know how to use
it. What would a good way to test it be?
echo 1234 | ./script.pl obviously won't do much. I wad told
./obj13-1.pl <
What the heck is obj13-1.pl?
To test your script you need a list of numbers one
When I do this, I get :
./script.pl <
line 3.
#!/usr/bin/perl
#require 'script.pl';
@userArray = ;
$sum = sumIt(@userArray);
print $sum;
Mr. Shawn H. Corey wrote:
> Amichai Teumim wrote:
>> ./script.pl | echo 1234
>>
>> Or is this nonsensical? Very very new to Perl.
>
> This is actually sh
On Sun, 2007-08-05 at 18:26 +0100, Jorge Almeida wrote:
> I have an interactive, shell-like, program. Some commands read a line
> from STDIN, or the whole STDIN (meaning until CTRL-D is pressed). Now I
> want to modify the program to have a batch mode. Commands would be read
> from STDIN (probably
Paul Lalli wrote:
Yes, it would have, if that's what you had. But you didn't. You had
the line:
#require 'lib.pl'
That is, you had the line commented out. A commented out line does
nothing at all.
Paul Lalli
Actually, in the post I replied to it was: #require 'script.pl';
The OP seems t
On Aug 6, 2:16 am, [EMAIL PROTECTED] (Sydney) wrote:
> The script working fine. but I like to save output of "$avar="$dir/
> $db" into a file. How do I do that? Thanks LC
perldoc perlopentut
perldoc -f open
perldoc -f print
Paul Lalli
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additiona
On Aug 5, 12:39 am, [EMAIL PROTECTED] (Aruna Goke) wrote:
> How can I work with this kind on expression without escaping the range.
>
> #!/usr/bin/perl
>
> use warnings;
> use strict;
> use DateTime;
>
> my $ystd = DateTime->today->subtract(days => 1);
> my $mdy = $ystd->ymd('-'); #date format in
On Aug 6, 7:56 am, [EMAIL PROTECTED] (Amichai Teumim)
wrote:
> Mr. Shawn H. Corey wrote:
> > Amichai Teumim wrote:
> >> #!/usr/bin/perl
> >> #require 'lib.pl';
> > require 'lib.pl';
> >> @userArray = ;
> >> $sum = sumIt(@userArray);
> >> print $sum;
>
> > If the sub sumIt() is in the file lib.pl,
On Aug 6, 6:52 am, [EMAIL PROTECTED] (Amichai Teumim) wrote:
> This is pure educational. I want to understand how this all works.
>
> So after follow your comments my script.pl looks like this:
>
> !/usr/bin/perl
This shebang is incorrect. Specifically, you're missing the "sh" part
of "shebang":
On 08/06/2007 05:52 AM, Dermot Paikkos wrote:
Hi All,
CGI;
Mime::Lite;
I am trying to take the input from a text field from a html page and
send it as an email. The text contains a UK sterling £ sign. It looks
fine on in the html page but when I send the mail or output the text
to STDERR, it
I thought that
require 'lib.pl';
was telling Perl where to find it.
Mr. Shawn H. Corey wrote:
> Amichai Teumim wrote:
>> When I do this, I get :
>>
>> ./script.pl <> 1234
>> 5678
>> 90
>> EOD
>>
>> Undefined subroutine &main::sumIt called at ./script.pl line 7,
>> line 3.
>>
>> #!/usr/bin/perl
The script working fine. but I like to save output of "$avar="$dir/
$db" into a file. How do I do that? Thanks LC
print "which client\n";
my $a = <>;
chomp $a;
my $db = <>;
chomp $db;
my $dir="/u1/data/$a";
my $avar="$dir/$db";
$avar="$dir/$db";
print "$avar\n";
--
To unsubscribe, e-mail: [E
Hi All,
CGI;
Mime::Lite;
I am trying to take the input from a text field from a html page and
send it as an email. The text contains a UK sterling £ sign. It looks
fine on in the html page but when I send the mail or output the text
to STDERR, it gets transformed into this: £
Here are a few of
Hi Paul
This is pure educational. I want to understand how this all works.
So after follow your comments my script.pl looks like this:
!/usr/bin/perl
use strict;
use warnings;
require 'lib.pl';
my @userArray = ;
my $sum = sumIt(@userArray);
print $sum;
AND my library like this:
sub sumIt(
Amichai Teumim wrote:
When I do this, I get :
./script.pl <
line 3.
#!/usr/bin/perl
#require 'script.pl';
require 'lib.pl';
@userArray = ;
$sum = sumIt(@userArray);
print $sum;
If the sub sumIt() is in the file lib.pl, you have to tell perl where to find
it.
--
Just my 0.0002 m
perl pra wrote:
hi jhon,
If I use use opendir/readdir I am getting the default directories . and ..
into the directoy handle.
Is there any way tha i could eliminate this.
For example if i want to copy all contentents of the directory(including
sub directories)
I open a directory Handle using
hi,
VMware while starting uses an exec call to execute its own version of
perl (5.005), But i need to use XML-RPC which does not come with VMware.
When i try to import or use XML-RPC like (require RPC::XML;) i got an error
saying the .pm file was missing.. so i went and added default @INC while
37 matches
Mail list logo