Dear my friends...
I am exhausted by a programming case which may be easy for you all. I am trying
to remove all the space (empty character) in a variable($k_tmp) in order to put
them in an array, one cell only for one word. The value of the variable
($k_tmp) is a page of google which I did using "UserAgent".
For identifying whether it's an 'empty displayed' value, I do so:
foreach my $k_tmp(@kalimat){
$spasi=0;
@k=split(" +",$k_tmp);
#####hapus sel berisi spasi######
foreach $k_tmp(@k){
my $spasi=$k_tmp=~/ +/g;
my $garisbaru=$k_tmp=~/\n+/g;
unless($spasi==1 or $garisbaru==1){
push(@k_isi,$k_tmp);
}
}
#end of 'hapus sel berisi spasi'#
$spasi=0;
push(@kata,@k_isi);
[EMAIL PROTECTED];
splice(@k,0,$z);
[EMAIL PROTECTED];
splice(@k_isi,0,$z);
}
But my program give output how I can not understand. I still have 'empty
displayed' value of a variable in '@k_isi'.
As far as I know, the sort of data/character/string those displayed empty space
are only space (' ') and newline ('\n').
Please tell me if there is still other "things" which will be diplayed empty by
"print $var".
Thank you very much in advance.
--
Patrik Hasibuan <[EMAIL PROTECTED]>
Junior Programmer
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/