Não pode transformar em um array?
perl -MData::Printer -e '$x="12345"; @foo = split//, $x; p @foo'
[
[0] 1,
[1] 2,
[2] 3,
[3] 4,
[4] 5
]
--
Lorn
On Tuesday, April 30, 2013 at 7:37 PM, Tiago Peczenyj wrote:
> Seguinte: tenho X bytes como
> $x="12345"
> E quero pegar o primeiro e o resto:
> ($a,$b) = magica $x;
> $a = 1
> $b = 2345
> Comofas?
> Eu posso fazer bytes::substr 2 vezes mas ta feio...
>
> =begin disclaimer
> Sao Paulo Perl Mongers: http://sao-paulo.pm.org/
> SaoPaulo-pm mailing list: [email protected] (mailto:[email protected])
> L<http://mail.pm.org/mailman/listinfo/saopaulo-pm>
> =end disclaimer
>
>
=begin disclaimer
Sao Paulo Perl Mongers: http://sao-paulo.pm.org/
SaoPaulo-pm mailing list: [email protected]
L<http://mail.pm.org/mailman/listinfo/saopaulo-pm>
=end disclaimer