Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^6: How do I replace \t and regarding to the alignment requirement ?

by PerlOnTheWay (Scribe)
on Apr 19, 2012 at 14:32 UTC ( #965987=note: print w/replies, xml ) Need Help??


in reply to Re^5: How do I replace \t and regarding to the alignment requirement ?
in thread How do I replace \t and regarding to the alignment requirement ?

Is there a way to treat them as a whole?
  • Comment on Re^6: How do I replace \t and regarding to the alignment requirement ?

Replies are listed 'Best First'.
Re^7: How do I replace \t and regarding to the alignment requirement ?
by BrowserUk (Pope) on Apr 19, 2012 at 14:58 UTC

    $s = "The\tquick\tbrown\tfox\njumps\tover\tthe\tlazy\tdog";; print $s;; The quick brown fox jumps over the lazy dog ($t=$s); $t =~ s[([^\n]+\n?)]{ my$l=$1; 1 while $l=~s[(\t)]{ '.'x(8-($-[0] % 8) +)}e; $l}ge; print $t;; The.....quick...brown...fox jumps...over....the.....lazy....dog

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

Re^7: How do I replace \t and regarding to the alignment requirement ?
by JavaFan (Canon) on Apr 19, 2012 at 14:43 UTC
    I'm sure there is. And while I don't mind helping people to solve a problem, I don't always feel like people who want their problem solved using arbitrary restrictions on the solution. You're asking "can I paint my hallway?" followed by "but can I paint it through the mailbox?".

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965987]
help
Chatterbox?
[atcroft]: james28909: Make both hands into fists, place them together (with thumbs concealed), and every knuckle is a month (starting with Jan.) has 31 days, every dip (between knuckles) does not....
[atcroft]: (And Feb. is the odd case, because it is 28, unless it is a year divisible by 4, or if it is divisible by both 100 and 400 (at which point it is 29).)
[james28909]: i know but scroll through your calendar on your computer.
[james28909]: i thiught you were going to say make both hands into a fist and puch yourself in the face
[atcroft]: .oO(Sorry, I probably should have said take two normal hands....)
[atcroft]: james28909: No, unless you are a politician, I wouldn't say that (and even if you are, I still probably wouldn't say that).
[james28909]: i mean how hard can it be? its just subtracting days lol
[atcroft]: james28909: What about October 5, 1582?
[stevieb]: atcroft: "Make both hands into fists..."... is something my Ma taught me in our native lang, but I was to ignorant and young to pay attention. Thanks for that :)
[atcroft]: stevieb: Sad to say that I only recently learned that particular trick, but I have since found it very useful.... :)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2017-04-29 04:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.