On Aug 26, 2007, at 3:52 PM, Peter Scott wrote:
The term "strong typing" is so ill-defined as to make this an
angels-dancing-on-a-pinhead discussion and unlikely to lead to any
enlightenment. Even the Wikipedia definition says that there *is* no
accepted definition and some of the common usages
On Sat, 25 Aug 2007 18:22:13 -0700, (Randal L. Schwartz) wrote:
>> ""Jeff" == "Jeff Pang" <[EMAIL PROTECTED]> writes:
>
> "Jeff> Perl isn't a strong type language like C,so you don't have the need to
> "Jeff> convert the variable type distinctly.
>
> Perl is a very strongly typed language. T
On Aug 26, 2007, at 3:22 AM, Randal L. Schwartz wrote:
Perl is a very strongly typed language. The problem is that people
keep
thinking "number" or "string" is a type in Perl. It isn't. The
type is
called "scalar". Other types are "array" and "hash" and
"filehandle" and
"dirhandle" and
> ""Jeff" == "Jeff Pang" <[EMAIL PROTECTED]> writes:
"Jeff> Perl isn't a strong type language like C,so you don't have the need to
"Jeff> convert the variable type distinctly.
Perl is a very strongly typed language. The problem is that people keep
thinking "number" or "string" is a type in P
Rodrigo Tavares schreef:
> print "Enter with the fisrst number\n";
> my $num = ;
>
> How I can to convert variable $num, in string ?
$num already contains a string. When you input 1 2 3 , it will
contain "123\n".
With chomp() you can remove the newline, but you can also use int(), see
`perldoc -
On 8/25/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote:
> In many languages there is a function for convert int
> for string. Ho I can do it in Perl ?
It's so easy to put a number into a string, we don't have a function
for it. We simply interpolate:
my $age = 6 * 7; # or any other number
pri
Rodrigo Tavares wrote:
Hello,
I want to convert the int for string, then use the
function lenght, and return the size of string.
How It is possible ?
Perl automatically converts a number to and string (and back again) as needed.
To get the length of its string, use the length function:
my
Hello,
I want to convert the int for string, then use the
function lenght, and return the size of string.
How It is possible ?
Best regards,
Rodrigo Faria
--- Jeff Pang <[EMAIL PROTECTED]> escreveu:
> 2007/8/26, Rodrigo Tavares
> <[EMAIL PROTECTED]>:
> > Hello Jeff,
> >
> > See this simple s
2007/8/26, Rodrigo Tavares <[EMAIL PROTECTED]>:
> Hello Jeff,
>
> See this simple script:
>
> print "Enter with the fisrst number\n";
> my $num = ;
>
> How I can to convert variable $num, in string ?
>
This is really depend on what operation context the variable is in.
As I've said,when you use it
Hello Jeff,
See this simple script:
print "Enter with the fisrst number\n";
my $num = ;
How I can to convert variable $num, in string ?
Best regards,
Rodrigo Faria
--- Jeff Pang <[EMAIL PROTECTED]> escreveu:
> 2007/8/26, Rodrigo Tavares
> <[EMAIL PROTECTED]>:
> > Hello,
> >
> > In many la
On 8/25/07, Jeff Pang <[EMAIL PROTECTED]> wrote:
> 2007/8/26, Rodrigo Tavares <[EMAIL PROTECTED]>:
> > Hello,
> >
> > In many languages there is a function for convert int
> > 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
2007/8/26, Rodrigo Tavares <[EMAIL PROTECTED]>:
> Hello,
>
> In many languages there is a function for convert int
> 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
12 matches
Mail list logo