You're right!
It appears that I'd been considering "net use" to be a command, when it
appears that "net" is the command and "use" is a modifer.
I haven't been able to double check it yet here at home, but when I
modify the test program to invoke only "net use", I get the expected
report, and the
Hi everyone,
I'm working on a script that will compile statistics for helpdesk tickets. To compute
these stats, I need to be able count the number of "business hours" between the
opening and the resolution of tickets. The working hours are 08:00 to 17:00 so a
ticket opened on Monday at 16:00 a
Francoys Crepeau wrote:
>
> Hi everyone! I hope someone can tell me what I'm doing wrong.
Hello, I hope so too.
> I'm running ActivePerl 5.6 on an NT4 (service pack 5) box.
>
> One of the things I have to do is to have a Perl script "map" a network
> drive to a drive letter.
>
> When one manu
Maybe system() isn't the right way to go with this. Try using backticks
(`net use * server\\share`) or use the Win32::Lanman modules
NetShareAdd() function. My personal take on system() and backticks is that
they should only be used when absolutely necessary. You can control what
Perl doe
The 'use strict' pragma is a little hard to get used to if you have
been coding a while without it, but can be a great help in creating and
debugging your programs. 'use strict' lets the perl interpreter know that
you want all variables, subs, and references to be declared and scoped.
Her
Hi everyone! I hope someone can tell me what I'm doing wrong.
I'm running ActivePerl 5.6 on an NT4 (service pack 5) box.
One of the things I have to do is to have a Perl script "map" a network
drive to a drive letter.
When one manually does this from the command line, it is done using the
"ne
HI, all:
I am wondering what else 'use strict' does besides it
is stated in the perldoc that it stricts on use of
'vars', 'refs' and 'subs'. Thanks.
yc
__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
--
T
From: "James Kelty" <[EMAIL PROTECTED]>
> I have looked through the Camel book a couple of times, and I am still
> confused as to the usefullness of the eval, and BEGIN type structures.
> Could someone give me a 'real-world' example, and possibly another
> explanation of the two
I have looked through the Camel book a couple of times, and I am still
confused as to the usefullness of the eval, and BEGIN type structures. Could
someone give me a 'real-world' example, and possibly another explanation of
the two structures? I would like to know if I should be using them in my
f
Hi, Mariusz, :)
I don't qualify as an expert, but this might do the trick:
my %params;
$params{$_} = param($_) foreach param();
If I understand your code correctly, param() returns a list of all the
possible keys, right? If so, then the above code should work. You refer to
the parameters as
You can use the import_names function of CGI
import_names( 'R' );
print "name = ", $R::name;
This function will import all of the parameters into the namespace provided
as the argument (in this case, R). If the parameter is multivalued, then
you can use the array form( e.g. @R::name ). Otherw
hi,
I have a html form with over 100 fields, is there a quick way to assign them in the
way that the scalar name becomes the name of the field and the value of the field is
being assigned to that scalar? I know I can just type it one by one:
$name = param('name');
$lastname = param('lastname');
> when studying PERL, how many months does
> it generally take to get past the
> "baby talk" stage?
Assuming full time, and some experiance of
other languages you should be quite proficent
after 2-3 months... I created my first script,
Tk script, module and object by then - albeit
they were'nt pe
It took me about six months before I started to feel like I could hold my
own. Of course, four months later I realize that I just didn't know enough
about some things to realize how much more I needed to know. For me one of
the great things about Perl is that you can learn the basics very quick
--- "Gavin Nelmes-Crocker [CobaltWorld]" <[EMAIL PROTECTED]> wrote:
> Guys, I've got a newbie question - I have been hacking at a perl script to
> change it to do what I want - it nearly does but I can't understand why the
> main bit isn't working. Basically the script gets sent a string from an
Months you say? hehehe I don' think I'll ever get out of it.
- naika
http://www.naikaonline.com
-Original Message-
From: crash [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 3:49 PM
To: [EMAIL PROTECTED]
Subject: kung foo
when studying PERL, how many months does it generally
when studying PERL, how many months does it generally
take to get past the "baby talk" stage?
any estimates?
__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For a
Guys, I've got a newbie question - I have been hacking at a perl script to
change it to do what I want - it nearly does but I can't understand why the
main bit isn't working. Basically the script gets sent a string from an
html form which it then needs to use as part of a system command.
I'm not
siren jones [[EMAIL PROTECTED]] quoth:
*>I tried the following code to retrieve netCDF data files from a website.
*>
*>use LWP::Simple
*> getstore("source_url"/", "input_filename");
perl -MLWP::Simple -e 'getstore "http://www.cpan.org","foo";'
works like a charm.
However, yours, with the addit
Hello,
I have a perl script which is working as TCP socket server.
In this I am redirecting STDOUT to file.
with command in the begining of the script:
open STDOUT, '>./tRL.out' or die "./tRL.out: $!";
I have following four "print STDOUT" commands
while (accept(CLIENT,SERVER)) {
I've been growing interested in the Tk module too. I found this today.
It's really really introductory.
http://www.perl.com/pub/a/1999/10/perltk/
I tried the following code to retrieve netCDF data files from a website.
use LWP::Simple
getstore("source_url"/", "input_filename");
The problem is when I go to read the netCDF file I can't. It is as if it
does an ASCII transfer instead of a binary or some such thing? Don't really
know.
I don't know of a searchable archive.
To format the number you can either roll your own, grab the solution in the
Perl Cookbook, or use Number::Format.
http://search.cpan.org/search?mode=module&query=Number%3A%3AFormat
use Number::Format;
my $commaNum = new Number::Format(-thousands_sep => '.
On Mar 15, Brian Warn said:
>Hi, two questions: is there an easy way -- using printf, etc. -- to
>format 100 such that it appears as 1,000,000? Also, is there a
>searchable archive of the beginner list anywhere?
As per commas, the Perl FAQ has the answer:
perldoc -q commas
As for the a
Hi, two questions: is there an easy way -- using printf, etc. -- to
format 100 such that it appears as 1,000,000? Also, is there a
searchable archive of the beginner list anywhere?
Thanks, Brian
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTE
- filename = sample.pl --
#!{location of your perl interpreter}
use HTML::Template;
my $template = HTML::Template->new(filename => 'test.tmpl');
$template->param(
HOME => $ENV{HOME},
PATH => $ENV{PATH},
);
print "Content-Type: text/html\n\n";
print
> What I want to do is use different html
> templates (the location if which can be stored on the
> database) to display
> the relevant information. For example: if i read data off a
> database that
> has 3 pictures i would use 1 template, if the page has 4 pics
> i would use
> another temp
Hi all,
I wonder if anyone can help me - i am writting some perl scripts that read
information off a database. What I want to do is use different html
templates (the location if which can be stored on the database) to display
the relevant information. For example: if i read data off a database
"Tirthankar C. Patnaik" wrote:
>
> This might seem trivial, but it has me stumped.
>
> The variance of numbers 0..20 is 38.5.
> Then why does Math:NumberCruncher show it as 36.6667?
>
> Here's a sample prog, and it's output. Here test04.dat is a file that has
> numbers 0 to 20, on separate line
Hi Troy,
> Then I have the following code to re-assign it to variables:
>
> ---
> unless ($action) {
> open (TEMP,"$filename2") or die "Can't Open $filename2:
> $!\n"; $line = ; close(TEMP); ($dt, $time, $topic,
> $eurom) = split(/\|/, $line); $e
> if ( ( $hash -> { $paragraph } ) =~
> s/###(\w+.*\.jpg)###/($text_link)/ ) {
> $figure_name = $1;
>
> $text_link = $cgi -> a({-href => "javascript:
> window.open('$pix_dir/$figure_name',"
> . " '', "
> . " 'status=yes, "
>
> Just wondering how I would go about having this URL
> www.mydomain.com/cgi-bin/test.cgi?data=test
>
> Would be parsed to...
>
> www.mydomain.com/cgi-bin/test2.cgi
>
> From test2.cgi I would like to be able to read that data = test from
test.cgi.
In test.cgi, do the following
=code
use C
Remember your command ticks.
$my_output = `do_something`;
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi Nick,
I cannot tell you how ashamed I am. This should've been absolutely
obvious to me (I also did graduate studies in Statistics, after which I
switched to Economics, and Finance.) I guess it's TGIF feeling, or just
workload, but my mind didn't perhaps work, when I failed to
Hi Tirthankar,
I knew my Graduate work in Statistics would come in handy at some point...
:-) Without looking at the documentation for Math:NumberCruncher, I can
fairly confidently say that both you and Math:NumberCruncher are right, but
you are trying to calculate different things. In the fol
This might seem trivial, but it has me stumped.
The variance of numbers 0..20 is 38.5.
Then why does Math:NumberCruncher show it as 36.6667?
Here's a sample prog, and it's output. Here test04.dat is a file that has
numbers 0 to 20, on separate lines.
#---start
I am planning to write a litte graphical interface for an application that has a full
CLI. Perl Tk, should accomplish this. What i need is more information then the one
that is in the perlfaq, i need instructions, faqs,snippets, all i can get, can anyone
point me in the right direction for this
From: [EMAIL PROTECTED] (Martin A. Hansen)
> i have a loop containing the following block of code. however, first
> time the loop is run, $text_link is empty, which it shouldn't be. i
> cant move the declaration of $text_link above the if statment, because
> then the $figure_nam
--- Kubert <[EMAIL PROTECTED]> wrote:
> I am writing a perl program in which I need to execute
> a korn shell script and pass it multiple arguments. I
> am assuming that I can use the "system" routine but I
> am not sure what the syntax would be. Can you help?
Do you need information back?
I am writing a perl program in which I need to execute
a korn shell script and pass it multiple arguments. I
am assuming that I can use the "system" routine but I
am not sure what the syntax would be. Can you help?
--
__
Your
> if ( ( $hash -> { $paragraph } ) =~
> s/###(\w+.*\.jpg)###/($text_link)/ ) {
Obviously you ain't using warnings or strict if
$text_link has any chance of being undefined.
Also, you should have a else clause, looking
something like:
else {
undef $test_link;
}
Jonathan Paton
_
hi
i have a loop containing the following block of code. however, first time the loop is
run, $text_link is empty, which it shouldn't be. i cant move the declaration of
$text_link above the if statment, because then the $figure_name would be empty.
now i guess im really missing out on somethin
Had to uninstall ActivePerl and reinstall, rather than just install over older
version, and then it worked, no need to 'ppm install LWP::Simple'.
use LWP::Simple;
if (my $img = get("$image_url")) {
open OUT, "> $file_to_write";
binmode OUT;
43 matches
Mail list logo