Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] how to print a space

Expand Messages
  • Greg Webster
    ... I think this one should work fine. ... First, make $a= 0,0,123 ; (notice the quotes) then @a=split(/,/,$a); Greg A great many people think they are
    Message 1 of 2 , Sep 5, 1998
    • 0 Attachment
      At 09:37 AM 9/5/98 +0800, you wrote:
      >1.How to print a string with spaces?
      >print "$a $b $c" #Is it ok?One space before $b and two spaces before $c

      I think this one should work fine.

      >2.How to split a string with comma?
      >$a=0,0,123
      >@a=split(/,/,$a);
      >@a=split(/","/,$a);# Which one is right?

      First, make $a="0,0,123"; (notice the quotes)
      then @a=split(/,/,$a);

      Greg


      A great many people think they are thinking when they are merely
      rearranging their prejudices.
      -- William James gwebster@...

      ____________________________________________________________________

      List Site: http://www.findmail.com/list/perl-beginner/
      To unsubscribe, send to perl-beginner-unsubscribe@...

      FREE group e-mail lists at http://www.findmail.com
    Your message has been successfully submitted and would be delivered to recipients shortly.