Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 69123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:31:26+00:00 2026-05-10T19:31:26+00:00

I may be in the minority here, but I very much enjoy Perl’s formats

  • 0

I may be in the minority here, but I very much enjoy Perl’s formats. I especially like being able to wrap a long piece of text within a column ("~~ ^<<<<<<<<<<<<<<<<" type stuff). Are there any other programming languages that have similar features, or libraries that implement similar features? I am especially interested in any libraries that implement something similar for Ruby, but I’m also curious about any other options.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:31:27+00:00Added an answer on May 10, 2026 at 7:31 pm

    FormatR provides Perl-like formats for Ruby.

    Here is an example from the documentation:

    require 'formatr' include FormatR  top_ex = <<DOT    Piggy Locations for @<< @#, @###                      month, day, year  Number: location              toe size ------------------------------------------- DOT  ex = <<TOD @)      @<<<<<<<<<<<<<<<<       @#.## num,    location,             toe_size TOD  body_fmt = Format.new (top_ex, ex)  body_fmt.setPageLength(10) num = 1  month = 'Sep' day = 18 year = 2001 ['Market', 'Home', 'Eating Roast Beef', 'Having None', 'On the way home'].each {|location|     toe_size = (num * 3.5)     body_fmt.printFormat(binding)     num += 1 } 

    Which produces:

       Piggy Locations for Sep 18, 2001  Number: location              toe size ------------------------------------------- 1)      Market                   3.50 2)      Home                     7.00 3)      Eating Roast Beef       10.50 4)      Having None             14.00 5)      On the way home         17.50 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer getting help from Andrew I've missed to add extension to… May 11, 2026 at 11:27 am
  • added an answer When you create a new MVC project, the csproj template… May 11, 2026 at 11:27 am
  • added an answer It's exactly the way you said it: Triangulated polygons render… May 11, 2026 at 11:27 am

Related Questions

I may be in the minority here, but I very much enjoy Perl's formats
In the near future, I may be teaching a Ruby programming class to undergraduates
Maybe I'm not looking in the right places but I'd like to use SQL
Maybe this is a dumb question, but I have the following behavior in Visual
I wish to download a web page, which may be in any possible text
I've written a DLL that may be used in a number of ways (referenced
I think, in almost all cases user preference data may be stored in a
Say I need some very special multiplication operator. It may be implemented in following
I'm new to C# and .Net in general so this may be a naive
Maybe I live in a bubble, or am just too new, but I was

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.