malaga has asked for the wisdom of the Perl Monks concerning the following question:

why won't this print 7 spaces before whatever?
print ' ', ' ', ' ', ' ', ' ', ' ', ' ', "whatever";

Replies are listed 'Best First'.
Re: spaces/html
by boo_radley (Parson) on Feb 14, 2001 at 00:08 UTC
    it does. look at the source code :) you may mean   , which is a non breaking space.
    print "&nbsp"x7,"whatever";
    also note the use of the 'x' operator.
Re: spaces/html
by myocom (Deacon) on Feb 14, 2001 at 00:07 UTC

    It will (try it from a command line), but those spaces won't show up in a browser. Multiple whitespace is condensed to one space in HTML. If you really need spaces to show up like that in a browser, use non-breaking spaces.

Re: spaces/html
by Chady (Priest) on Feb 14, 2001 at 00:25 UTC
    If you need the spaces in your HTML, you can use a <pre> tag to print out a PreDefined width
    Of course, you might already know that...
    Chady | http://chady.net/
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: spaces/html
by malaga (Pilgrim) on Feb 14, 2001 at 00:13 UTC
    thank you. the " "x7," is what i needed. it's the little things.....
Re: spaces/html
by monk2b (Pilgrim) on Feb 14, 2001 at 03:49 UTC
    If you are trying to tab(offset at the front of a line) you can use <ul><li></li><li></li></ul> for that.I hope that helps
    learning too