Greetings there foreign forum visitors. I am completely new to programming, in fact i have only started today, but i am a fast learner. I decided to undertake Perl and i wrote a simple program that has 2 main loops , each of which are supposed to take an input value number from the user, and check if it fits the requirements (being between 1 and 100 ), and then it will multiply them and find the module. Pretty straight forward. This is what i wrote:
And when i try to execute it in my perl cmd, i get the following errors.
Now i have searched over the forums a bit and i seemed to find other users with the same problem but none of the answers i found ultimately changed the outcome, so i thought to post my thread.
NOTE: This is my first ever program so no making fun. Also if anyone has any better syntax or recommendations, they r more than welcome.
Can anyone tell me if the copy command in PERL has the same functionality as in KSH shell in UNIX or does it actually move the file ??
$cp_stat=system("cp $ENV{OLAMEBSDIR}/data/olam.ddabal$type $ENV{OLAMDIR}/balance/data/olam.ddabal$type.$HeaderDate"); (1 Reply)
Hi everyone,
Is Perl compiled? I keep running into references to Perl being compiled which is drivin me nuts because I thought it was an interpreted language. I am tired of the confusion, I am obviously misunderstanding something. Would someone mind explaining to me the exact order of events... (1 Reply)
Hello Everybody,
I am using perl.....
I have a variable called line which stores the line of a file.
I dont know how many words there will be in this line.
But I would like to find out in perl and also store these words in the $1,$2,$3 and $4 variables eg if the line is
"first second... (2 Replies)
If I use 2 system commands in a script, will one finish before the next one starts? or will it start the first and the second at the same time?
i.e.
system("ps | grep rminer");
system("ls -al | grep 431"); (1 Reply)
perl -wnl -e '/\bsomepattern\b/i and print $&;'
I know above command only greps out the somepattern and print them(not entire line).. but how do I look for multiple pattern and only print them.. is that possible?
perl -wnl -e '/\bsomepatternd\b/i and /\bsomepattern2\b/i and print $&;' does... (7 Replies)
Hello all,
I have the following line:
xxx|xxxx|xxxx|xxx.xx|xxx
And i insert the values in an array. I am trying to find out if the field of the array (where field=xxx.xx) has the '.' character.
I am using the code below but it doesn't seem to work.
if($field=~ /./)
{
... (3 Replies)
Hi Guys,
short question -
thereīs every 5 minutes an cronjob for user "wwwrun" - and every 5 minutes root gets an email about this cronjob.
Now my question:
how can i realize, that root donīt get an email about this cronjob but on all other jobs ...
perhaps crontab for wwwrun:
*/5... (2 Replies)
Hi,
we complied the perl on diff machine ( /opt/dba/perl-5.8.8) . Created TAR and using it on diff box ( again the location is same) . when I tried to put this tar to diff locaiton , it PERL connections are failing . because the @ INC still pinting to :
oracle@abc:/opt/dba/oraadmin/tools DEV$... (1 Reply)
Hi,
please help me with below question
i am executing the below command from command line
perl -e '($hi)=glob("nosum*"); print "$hi"';
As i have nosum_website.sh file in current directory it gave the following output
$ perl -e '($hi)=glob("nosum*"); print "$hi"';... (2 Replies)
Hello everybody, I am new at the forum and a total newbie when it comes to Unix.
I am trying to see how I can add the ability to kill a user's processes?
I want to add this to my Shel Script Add the code/process into a subroutine.
Also, I would like to use an array to store the list... (0 Replies)
Discussion started by: kinelisch
0 Replies
LEARN ABOUT OSX
io::digest
IO::Digest(3) User Contributed Perl Documentation IO::Digest(3)NAME
IO::Digest - Calculate digests while reading or writing
SYNOPSIS
use IO::Digest;
# Get a Digest::MD5 object that takes input while $fh being written or read
$iod = IO::Digest->new ($fh, 'MD5');
print $fh "fooo";
print $iod->hexdigest
DESCRIPTION
This module allows you to calculate digests while reading or writing file handles. This avoids the case you need to reread the same
content to compute the digests after written a file.
TEST COVERAGE ----------------------------------- ------ ------ ------ ------ ------ ------
File stmt branch cond sub time total
----------------------------------- ------ ------ ------ ------ ------ ------
blib/lib/IO/Digest.pm 100.0 n/a n/a 100.0 100.0 100.0
Total 100.0 n/a n/a 100.0 100.0 100.0
----------------------------------- ------ ------ ------ ------ ------ ------
AUTHORS
Chia-liang Kao <clkao@clkao.org>
COPYRIGHT
Copyright 2004 by Chia-liang Kao <clkao@clkao.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
perl v5.16.2 2004-09-11 IO::Digest(3)