Hi Mr./Ms. Wang,

On Thu, 5 Feb 2015 09:03:19 +0000
"Wang, Zeng-Sheng (TS-GSD-China-ZZ)" <zengsheng.w...@hp.com> wrote:

> Dear all,
> I meet a problem and I can't resolve it. Would you like to help me for it?
> I simple my problem to below text.
> 
> $a content:
> a b c
> d e f
> j p k
> 
> $b content
> 
> x y z
> q w e n
> a s d
> 

First of all - a note - you should not call your variables $a and $b :

http://perl-begin.org/tutorials/bad-elements/#vars-a-and-b

(or $_ naturally).

> $c content
> 1 2 3
> 3 4 5
> 8 9 2 1
> 
> $x content
> 
> a b c       x y z                       1 2 3
> d e f       q w e n                 3 4 5
> j p k        a s d                       8 9 2 1
> 
> how to use $a, $b and $c product $x?
> 


Well, the blocks in $x are not properly aligned so I don't know what are your
exact intentions. That put aside - look into converting the lines and
characters in the string into two-dimensional arrays and back. See:

http://perl-begin.org/topics/references/

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://shlom.in/enemy

Chuck Norris does not keep any numbers on his mobile phone’s address book.
Instead, he memorised the entire phone directory.
    — http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to