Craig S Monroe wrote:
Hello All,
I am a newbie to the list and have a question. I have searched for an answer
through the
docs, but cannot seem to locate a resolution.
I have written a script that opens a socket to a particular device,
and issues it commands. I would then like it to
Does anyone know where I can find information on passing parameters (flags)
on the command line?
thank you
tanya
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 31, 2001 9:13 AM
To: '[EMAIL PROTECTED]'
Subject: Re: directory again
Hi,
I need
Dear all,
I have a question about a regular expression, for example
$OK = c:\\temp\\test\\test1\\test2;
How can I do to make me get
$OK1 = c:\\temp\\test\\test1;
That means I do not want the last part of the directory.
Thanks in advance!
Lixin
___
$OK = c:\\some\\dir\\file;
$OK =~ /(.*)(\\.*)$/;
$OK1 = $1;
...of course it isn't portable across operating systems, and it assumes that
filenames can't contain \.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday,
Unix: man perlrun
Windows: Open the perl documentation and read the section titled perlrun.
Both: Take two aspirin.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Tanya Graham
Sent: Thursday, May 31, 2001 4:02 PM
To: '[EMAIL PROTECTED]'
Subject:
i found it...for some reason since i couldn't find parameters in the index
i freaked out, and after a few minutes i realized i could look up
arguments...been a long day...
tanya
-Original Message-
From: Trever Furnish [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 31, 2001 2:33 PM
To:
$#ARGV contains the number of arguments minus one in @ARGV, i.e. the first argument is
$ARGV[0]. Sample code:
# Check that the required number of arguments have been passed.
if ($#ARGV 0)
{
Help();
$InputFile = GetUserInput('Enter the input filename',0);
}
-Original Message-
Behalf Of Dirk Bremer
$#ARGV contains the number of arguments minus one in @ARGV, i.e.
the first argument is $ARGV[0]. Sample code:
# Check that the required number of arguments have been passed.
if ($#ARGV 0)
{
Help();
No regex in answer here but...
Is this what you want?
use File::Basename;
$OK = c:\\temp\\test\\test1\\test2;
$OK1 = dirname($OK);
print dir of
$OK
is
$OK1\n;
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 31, 2001 5:17 PM
Subject:
In the script below when I send a START msg to the socket it is
successfully received. When I send a STOP msg it is not. What am I
doing wrong here?
James
use strict;
use IO::Socket;
my $client;
my $server_port = 5010;
my $server = IO::Socket::INET-new(LocalPort = $server_port,
Not really a regex approach but here is my submittion:
$OK = c:\\temp\\test\\test1\\test2;
$your_answer = substr($OK, 0, rindex($OK, \\));
# print $your_answer,\n;
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 31, 2001
-Original Message-
Behalf Of James McDermet
In the script below when I send a START msg to the socket it is
successfully received. When I send a STOP msg it is not. What am I
doing wrong here?
James
use strict;
use IO::Socket;
my $client;
my $server_port = 5010;
James McDermet wrote:
In the script below when I send a START msg to the socket it is
successfully received. When I send a STOP msg it is not. What am I
doing wrong here?
James
use strict;
use IO::Socket;
my $client;
my $server_port = 5010;
my $server =
Test message; my last lag test message was delivered to the list two days
after it was posted.
-Bennett
[EMAIL PROTECTED] http://www.peacefire.org
(425) 649 9024
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
Using the following code right out of the ActiveState docs works to read my
own computer event log, but when I run it against a remote computer
(replacing VIC20 with servername) it returns nothing, just executes and
ends with no output or error...
I am checking remote NT4 logs from a Win2K
Do
perl -MCPAN -e 'install Mail::Mailer'
This will get it off CPAN for you.
David
Hello guys,
Does anyone have a copy of Mail::Mailer they can email me. Or if their
is an equivalent please let me know.
Thanks alot,
Mark Bergeron
A Duck!
Ah!
It starts again!
I german; my is english learn also better
-Ursprüngliche Nachricht-
Von: VeeraRaju_Mareddi [SMTP:[EMAIL PROTECTED]]
Gesendet am: Donnerstag, 31. Mai 2001 12:34
An: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]';
'[EMAIL PROTECTED]'
Betreff:
Please check the archive of perl-win32-users :
this was asked and answered yesterday!
Please don't cross post to so many groups:
this reply to so many is just to save others
time.
lee
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
Hi!
I'm getting some information from my database and after some mathematical
operations i get a decimal number and i would like to round it...how can i
do that?
For ex:
if i have:
3,2 i want 3
3,5 i want 4
thanx
A. Vasconcelos
___
I'm getting some information from my database and after some mathematical
operations i get a decimal number and i would like to round it...how can i
do that?
A lot of people will say int! int!, but you can find a more powerful
routine called round at the URL below. It allows you to choose
If you want to simply round to the nearest integer, then do
$number = int($number + 0.5)
Therefore, n.4999... and below become n while n.5... and above
become n+1.
The only problem with this simple fix is that it is biased because slightly
more numbers will rounded up to the
Have you seen the docs? If yes, please ignore; otherwise:
perldoc -q round:-
Does Perl have a round() function? What about ceil() and floor()? Trig
functions?
Remember that int() merely truncates toward 0. For rounding to a
certain number of digits, sprintf() or
22 matches
Mail list logo