[Perl-unix-users] RE: determining if a scalar is an integer or not

2003-01-30 Thread Thomas_M
> another way is to use a regex and check if the var only 
> consists numbers:
> 
> if ($var1 =~ /^\d+$/) {
>   print "is int\n";
> } else {
>   print "not int"
> }

How about -7 or 5.0? Both are integers.

Wouldn't it be better for him to use one of the answers in the FAQ?

http://www.perldoc.com/perl5.6.1/pod/perlfaq4.html - How do I determine
whether a scalar is a number/whole/integer/float?


-- 
Mark Thomas[EMAIL PROTECTED]
Internet Systems Architect User Technology Associates, Inc.

$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;
 

___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: [Perl-unix-users] Query on writing perl script to telnet to aHP m/c remotely

2003-01-30 Thread Mark Mitchell
use Net::Telnet, I use it to connect to a HP Tandem main frame for days
at a time.

- Mark

On Wed, 2003-01-29 at 14:23, Shafi wrote:
> Hi Guys,
> 
> I am trying to write a perl script which can telnet to a HP m/c continously
> for a period of 3 mins. Could someone help me out in this.
> 
> Thanks a lot in advance.
> 
> Regards,
> Shafi
> 
> 
> 

> **Disclaimer
> 
> Information contained in this E-MAIL being proprietary to Wipro Limited is 
> 'privileged' and 'confidential' and intended for use only by the individual
>  or entity to which it is addressed. You are notified that any use, copying 
> or dissemination of the information contained in the E-MAIL in any manner 
> whatsoever is strictly prohibited.
> 
> 
>***


___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



[Perl-unix-users] How-to write a daemon

2003-01-30 Thread Mundell, R. \(Ronald\)
Title: How-to write a daemon





Good Day All


Does anyone know where can I get a good document to write a daemon in perl?


Ronald 





RE: [Perl-unix-users] How-to write a daemon

2003-01-30 Thread Thomas_M
Title: Message



Many ideas 
here:
http://search.cpan.org/search?query=daemon&mode=all

-- Mark 
Thomas    
[EMAIL PROTECTED] Internet Systems Architect User Technology Associates, 
Inc. 
$_=q;KvtuyboopuifeyQQfeemyibdlfee;; 
y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;   

  
  -Original Message-From: Mundell, R. 
  (Ronald) [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 
  2003 3:59 AMTo: Perl-Win32-Users (E-mail); Perl-Unix-Users 
  (E-mail)Subject: [Perl-unix-users] How-to write a 
  daemon
  Good Day All 
  Does anyone know where can I get a good document to 
  write a daemon in perl? 
  Ronald 


[Perl-unix-users] Re: determining if a scalar is an integer or not

2003-01-30 Thread Mark
- Original Message -
From: "Thomas_M" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, January 30, 2003 2:35 PM
Subject: RE: determining if a scalar is an integer or not


> > another way is to use a regex and check if the var only
> > consists numbers:
> >
> > if ($var1 =~ /^\d+$/) {
> > print "is int\n";
> > } else {
> > print "not int"
> > }
>
> How about -7 or 5.0? Both are integers.


Integer, you say? How about something real trivial, not using regex, like
"int ()"? :)

$a = '77';

if (int ($a)) {
print "Yes\n";
} else {
print "No\n";
}

- Mark

System Administrator Asarian-host.org

---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx


___
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: [Perl-unix-users] How-to write a daemon

2003-01-30 Thread Dodson, Gregor BGI SF
Title: How-to write a daemon



oreilly's perl cookbook has a great section on 
this.

  -Original Message-From: Mundell, R. (Ronald) 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, January 30, 2003 12:59 
  AMTo: Perl-Win32-Users (E-mail); Perl-Unix-Users 
  (E-mail)Subject: [Perl-unix-users] How-to write a 
  daemon
  Good Day All 
  Does anyone know where can I get a good document to 
  write a daemon in perl? 
  Ronald