From: "Vlad Vostrykh" <vlad@na.ru>
To: <mandrake-russian@altlinux.ru>
Subject: [mdk-re] Re: [mdk-re] К знатокам perl
Date: Thu Jul 19 14:56:12 2001
Message-ID: <07b401c11043$788fd570$4201a8c0@muc.beamgate.de> (raw)
In-Reply-To: <3B56BDFC.9C146E44@zmail.ru>
Привет.
Я далеко не знаток, но, сдается мне, умножение на 1 поможет:
dev > ./test.pl
876
876
999
dev > cat test.pl
#!/usr/bin/perl
$string1 = "876";
print $string1."\n";
$string1 = $string1*1;
print $string1."\n";
$string1 = $string1 + 123;
print $string1."\n";
dev >
WBR,
Vlad Vostrzkh
----- Original Message -----
From: "cornet" <cornet@zmail.ru>
To: <mandrake-russian@altlinux.ru>
Sent: Thursday, July 19, 2001 1:01 PM
Subject: [mdk-re] К знатокам perl
> Hello всем!
>
> Сорри за офтопик, но очень надо....
>
> Есть прога на perl.
> В проге по ходу работы, путем чтения строк из дискрипторов,
> создаются _строковые_ переменные вида:
> $string1="45493";
> $string2="0";
> $string3="0000043";
> $string4="5601";
> и тому подобные.
> Эти строки символизируют собой _целые_десятичные_числа_ именно в
> том виде как они в стрингах содержатся - 45443; 0; 43; 3404.
> То есть, в них содержатся _только_ десятичные цыфры в различном
> количестве. Это контролируется мной и отсекается ежели чего не
> так.
>
> Вопрос:
> А как бы мне по простому преобразовать эти строки в десятичные
> _числа_, что бы можно было поработать с ними в _числовом_
> контексте операторами + - < > == != ++ и тому подобное?
>
> Доки проштудированы - просветление отсутствует :-((
>
> Заранее спасибо.
>
> --
> ******** FIRE & STEEL ********
>
> _______________________________________________
> Mandrake-russian mailing list
> Mandrake-russian@altlinux.ru
> http://altlinux.ru/mailman/listinfo/mandrake-russian
>
next prev parent reply other threads:[~2001-07-19 14:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-19 14:47 cornet
2001-07-19 14:56 ` Vlad Vostrykh [this message]
2001-07-19 15:03 ` [mdk-re] " Sergey Degtyaryov
2001-07-19 15:08 ` Maxim Savrilov
2001-07-19 15:30 ` cornet
2001-07-19 15:40 ` [mdk-re] Re[2]: " Sergey Degtyaryov
2001-07-19 16:00 ` [mdk-re] " Dmitri D. Sayakin
2001-07-19 16:07 ` cornet
2001-07-19 17:24 ` [mdk-re] " Dmitri D. Sayakin
2001-07-19 17:52 ` cornet
2001-07-19 16:02 ` [mdk-re] Re[2]: [mdk-re] " cornet
2001-07-19 16:10 ` Sergey Degtyaryov
2001-07-19 16:05 ` [mdk-re] Re[2]: [mdk-re] Ê çíàòîêàì perl belanov
2001-07-19 15:49 ` [mdk-re] Re: [mdk-re] К знатокам perl Dmitri D. Sayakin
2001-07-19 16:00 ` cornet
2001-07-19 17:18 ` [mdk-re] " Dmitri D. Sayakin
2001-07-19 17:55 ` cornet
2001-07-19 16:06 ` [mdk-re] " Maxim Savrilov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='07b401c11043$788fd570$4201a8c0@muc.beamgate.de' \
--to=vlad@na.ru \
--cc=mandrake-russian@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git