Hello,
Aditi Gupta <[EMAIL PROTECTED]> asked:
> I have a perl code that generates a sequence of values which
> i want to plot on y-axis against 1,2,3... on x-axis. I've
> read that GD::Graph could be used for it. But I've never done
> modular programming. Also, I don't know how to install
>
---
test.pm
---
package test;
sub ReturnValue()
{
my $a=10;
return ($a);
}
1; # as a module usually has a return value
---
call.pl
-
Hello everybody,
I have a perl code that generates a sequence of values which i want to plot
on y-axis against 1,2,3... on x-axis. I've read that GD::Graph could be used
for it. But I've never done modular programming. Also, I don't know how to
install modules from CPAN.
Are there any other easier
> -Original Message-
> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 27, 2005 8:20 PM
> To: Ryan Frantz
> Cc: beginners perl
> Subject: Re: Block Confusion
>
> On Sep 27, Ryan Frantz said:
>
> > # list the processes to hunt for
> > my @findProcesses = (
On Sep 27, Bryan R Harris said:
"2*(3+2)" ==> 10
"2*dog" ==> "2*dog"
"mysquarefunction(2)" ==> 4
"3*mysquarefunction(2)" ==> 12
"some guy" ==> "some guy"
Here's a solution that works for the cases you've provided:
sub try_eval {
local $@;
my $warning;
local $SIG{__WARN__} = sub
On Sep 27, Ryan Frantz said:
# list the processes to hunt for
my @findProcesses = (
"putty",
"firefox",
);
foreach my $process (in
$serverObj->InstancesOf("Win32_PerfFormattedData_PerfProc_Process")) {
foreach my $matchProcess ( @findProcesses ) {
if ( $process->{Name} =~ /$matchProcess/o
> On Tue, 27 Sep 2005, Bryan R Harris wrote:
>
>> I'd like to evaluate user input only where it makes sense, e.g.
>>
>> "2*(3+2)" ==> 10
>> "2*dog" ==> "2*dog"
>> "mysquarefunction(2)" ==> 4
>> "3*mysquarefunction(2)" ==> 12
>> "some guy" ==> "some guy"
>
> What happens when they put somethin
Abhishek Dave wrote:
> hello all,
> i've wrote a small test subroutine in my file name test.pm and in the same
> directory i worte
> a perl file in which i've to call this subroutine in this perl program
>
Capitals, punctuation, and full words are a good idea when posting to a
public forum. Poor
Ing. Branislav Gerzo wrote:
> Hi Perlers,
>
> I have one nice question for you, I was run into common problem:
> need to repeat certain number of times something, until is succesful.
> For example - download webpage, FTP upload, connect to some host and
> so on.
> I ask you for some general (or it
hello all,
i've wrote a small test subroutine in my file name test.pm and in the same
directory i worte
a perl file in which i've to call this subroutine in this perl program
I dont know how to use perl modules
pls let me knwo abt that as it will solve my lots of problems
test.pm
sub ReturnVa
On Tue, 27 Sep 2005, Bryan R Harris wrote:
> I'd like to evaluate user input only where it makes sense, e.g.
>
> "2*(3+2)" ==> 10
> "2*dog" ==> "2*dog"
> "mysquarefunction(2)" ==> 4
> "3*mysquarefunction(2)" ==> 12
> "some guy" ==> "some guy"
What happens when they put something in like
"sys
On Tue, 27 Sep 2005, Ing. Branislav Gerzo wrote:
> Could be anyone so nice and write it ?
I'm sure someone *could*, but I wouldn't count on it happening :-)
> I have some snippets here, using eval {} and catch errors with calling
> recursive sub, but I don't think thats the best option.
That'
I'd like to evaluate user input only where it makes sense, e.g.
"2*(3+2)" ==> 10
"2*dog" ==> "2*dog"
"mysquarefunction(2)" ==> 4
"3*mysquarefunction(2)" ==> 12
"some guy" ==> "some guy"
I've tried:
if ($val =~ m|[0-9]|) { $val = eval $val; }
and
{
no warnings;
eval { $val2 = eva
On Tue, 27 Sep 2005, Dave Adams wrote:
> What is the purpose of the line "my $msg = shift;"?
In the context of subroutines, it copies the first scalar argument
passed to the routine to the variable $msg. If more than one argument
was passed, the others aren't touched by this statement -- as yo
Mulander wrote:
> If I understood you question properly you want to know why people use
> shift in subrutines and how does shift work.
>
> I will try to make it short:
> shift works on lists, it removes the first element of the list
perldoc -q "What is the difference between a list and an array"
Mulander wrote:
> If I understood you question properly you want to know why people use
> shift in subrutines and how does shift work.
>
> I will try to make it short:
> shift works on lists, it removes the first element of the list ( the 0
> indexed element ) and returns it as a lvalue ( if there
If I understood you question properly you want to know why people use
shift in subrutines and how does shift work.
I will try to make it short:
shift works on lists, it removes the first element of the list ( the 0
indexed element ) and returns it as a lvalue ( if there are no more
elements in a l
> -Original Message-
> From: Ryan Frantz
> Sent: Tuesday, September 27, 2005 5:27 PM
> To: Dave Adams; beginners perl
> Subject: RE: Shift Question
>
>
>
> > -Original Message-
> > From: Dave Adams [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 27, 2005 5:17 PM
> > To:
> -Original Message-
> From: Dave Adams [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 27, 2005 5:17 PM
> To: beginners perl
> Subject: Shift Question
>
> QUESTION: What is the purpose of the line "my $msg = shift;"? I am
> guessing it is for the @_ array but what list element is
Hi Perlers,
I have one nice question for you, I was run into common problem:
need to repeat certain number of times something, until is succesful.
For example - download webpage, FTP upload, connect to some host and
so on.
I ask you for some general (or it can't be possible - FTP upload)
function,
Perlers,
I'm struggling; I'm using WMI to monitor a few processes (kinda like my
last disk monitor) but my output repeats the first process in a list for
as many items as I have in the list. See below:
use warnings;
use strict;
use Win32::OLE('in');
my $megaBytes = "1048576";
my $serverObj =
QUESTION: What is the purpose of the line "my $msg = shift;"? I am
guessing it is for the @_ array but what list element is there to be
shifted off? It seems that the shift function is in a lot of
subroutines and I am confused as to their purpose.
#!/bin/perl -w
(my $PROGNAME = $0) =~ s/^.*\///;
Yes! That works. Thank you so much for your time.
On 9/27/05, Chris Devers <[EMAIL PROTECTED]> wrote:
>
> On Tue, 27 Sep 2005, Shelly Brown wrote:
>
> > I would like to display the daily calendar information from a perl
> > script: http://webapps.sbuniv.edu/daycal/ within an html page so it
> > lo
On Tue, 27 Sep 2005, Shelly Brown wrote:
> I would like to display the daily calendar information from a perl
> script: http://webapps.sbuniv.edu/daycal/ within an html page so it
> looks like this: http://www.sbuniv.edu/. Right now I have to manually
> enter the calendar information. I would l
Please bottom post...
Shelly Brown wrote:
> I would like to display the daily calendar information from a perl script:
> http://webapps.sbuniv.edu/daycal/ within an html page so it looks like this:
> http://www.sbuniv.edu/. Right now I have to manually enter the calendar
> information. I would lik
I would like to display the daily calendar information from a perl script:
http://webapps.sbuniv.edu/daycal/ within an html page so it looks like this:
http://www.sbuniv.edu/. Right now I have to manually enter the calendar
information. I would like for it to be dynamic. Make sense?
On 9/27/05, Sh
On Tue, 27 Sep 2005, Shelly Brown wrote:
> I would like to include a PERL file within an html or asp file. How do I do
> that? I'm working on a Windows server.
You're looking for a templating framework. Perl offers several,
including:
Template Toolkit ("TT")
HTML::Template
HTML::Mason (or si
I would like to include a PERL file within an html or asp file. How do I do
that? I'm working on a Windows server.
--
Shelly Brown
Hello ,
in your examples you're opening "files" not dir's , to open a directory use
this instead
opendir(DIR,$dirname) or die $!;
my @content = readdir(DIR);
closedir(DIR);
then to read files inside it ,
for (@content){
print ;
}
that's it , if you need to remove ("." and "..") which means the
On Sep 26, 2005, at 22:20, ZHAO, BING wrote:
Hi,
How do you INPUT the output( of a file) to the
designated file? To be specific, if the file being output generates
a score/number which needs to be subsequently input into another
file, how to you set up the output and input?
L
ZHAO, BING <[EMAIL PROTECTED]> asked:
> How do you INPUT the output( of a file) to the
> designated file? To be specific, if the file being output
> generates a score/number which needs to be subsequently input
> into another file, how to you set up the output and input?
>
Hi,
How do you INPUT the output( of a file) to the designated file? To be specific, if
the file being output generates a score/number which needs to be subsequently input into another
file, how to you set up the output and input?
Thannks a lot.
bz
--
To unsubscribe, e-
hi all...
i have a question..
I am realizing an application multithreaded, and my problem is that I'd
like to make lock on single values of a hashtable.. how can i make
it?my hash is shared with
share($hash);
$hash = \%hash;
but all elements of this are not shared.. so how can i share al
Hi,
Umesh T G <[EMAIL PROTECTED]> wrote:
> Below is my index.pl
Some comments:
> #!/usr/bin/perl
# consider using -T fpr taint mode
use strict;
use warnings;
# consider using the CGI module, too.
> use Env;
> print "Content-Type: text/html\n\n\n";
One \n too many.
> chdir("/path/to/dir");
Hello List,
Below is my index.pl
#!/usr/bin/perl
use Env;
print "Content-Type: text/html\n\n\n";
chdir("/path/to/dir");
@files=`ls -1`; ## load all the html files..
print "\n";
print "\n";
print <
function submit_form()
{
document.show_fi
35 matches
Mail list logo