Re: Convert int for string
- From: digolinopage@xxxxxxxxxxxx (Rodrigo Tavares)
- Date: Sat, 25 Aug 2007 14:16:18 -0300 (ART)
Hello Jeff,
See this simple script:
print "Enter with the fisrst number\n";
my $num = <STDIN>;
How I can to convert variable $num, in string ?
Best regards,
Rodrigo Faria
--- Jeff Pang <rwwebs@xxxxxxxxx> escreveu:
2007/8/26, Rodrigo Tavares
<digolinopage@xxxxxxxxxxxx>:
Hello,int
In many languages there is a function for convert
for string. Ho I can do it in Perl ?
Hello,
Perl isn't a strong type language like C,so you
don't have the need to
convert the variable type distinctly.
for example,
my $x = 123;
print $x * 2;
would print 246 correctly,perl treat $x as an int
type variable.
but when you say,
my $x = 123;
print $x . '@abc.com';
would print 123@xxxxxxxxxxxx joining $x with a
string,Perl treat $x as
a char variable.
Flickr agora em português. Você clica, todo mundo vê.
http://www.flickr.com.br/
.
- Follow-Ups:
- Re: Convert int for string
- From: Dr.Ruud
- Re: Convert int for string
- From: Jeff Pang
- Re: Convert int for string
- References:
- Re: Convert int for string
- From: Jeff Pang
- Re: Convert int for string
- Prev by Date: Re: Convert int for string
- Next by Date: Re: Convert int for string
- Previous by thread: Re: Convert int for string
- Next by thread: Re: Convert int for string
- Index(es):
Relevant Pages
|