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 8851467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:09:45+00:00 2026-06-14T13:09:45+00:00

Where can I find more about the following syntax in perl? The connection between

  • 0

Where can I find more about the following syntax in perl?

The connection between <DATA> and __DATA__ is unclear.

while (my $date_string = <DATA>) {
  chomp($date_string);
  next if not length $date_string;
  print "$date_string ist Unixtime ",
        $lang_date->str2time($date_string),
        " und ",
    $lang_date->time2str( '%d.%m.%Y %T (%Z)',$lang_date->str2time($date_string) ),
        "\n";
}

__DATA__
1.3.1999
1 Marz 1999
1. Marz 1999
1/3/1999
  • 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. Editorial Team
    Editorial Team
    2026-06-14T13:09:46+00:00Added an answer on June 14, 2026 at 1:09 pm

    Quoting the doc:

    The __DATA__ token tells the perl compiler that the perl code for
    compilation is finished.

    Everything after the __DATA__ token is
    available for reading via the filehandle FOOBAR::DATA
    , where FOOBAR is
    the name of the current package when the __DATA__ token is reached.

    This works just the same as __END__ does in package ‘main’, but for
    other modules data after __END__ is not automatically retrievable,
    whereas data after __DATA__ is.

    Can add to this only that using __DATA__ section is quite handy to illustrate some file reading-related concepts in Perl. it’s basically a file attached to a code, and contents of this file are easily accessible through <DATA>. That’s why it’s quite popular here on SO. )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone find a more Python'ic, more beautiful solution? I’m looping through some text
I thought I have seen this somewhere but can't find it any more on
Where can find resources about best practices for SharePoint programming? I am talking about
I just found out about the following code I can enter into the command
I am unable to find out more about this default parameter that I ran
I'm using Python/Django, but this is more about the data model and how I
I can't find a good explanation about global non static variables in unnamed namespace.
I've found out the following article about A More Efficient Method for Paging Through
I can find the JS and HTML code in response by alert() . But
I can find the tool command in my filesystem under: /Applications/Xcode.app/Contents/Developer/usr/bin/otool If I specify

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.