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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:20:22+00:00 2026-06-10T07:20:22+00:00

What could be wrong here? I am trying to display the content of an

  • 0

What could be wrong here?

I am trying to display the content of an existing file:

perl -MFile::Slurp -e 'print File::Slurp->read_file("/tmp/001.jpg", { binmode => ":raw" } ) if -e "/tmp/001.jpg"; '

and I get the error:

read_file 'File::Slurp' - sysopen: No such file or directory

The file exists, the print gets executed only if -e "/tmp/001.jpg"

  • 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-10T07:20:23+00:00Added an answer on June 10, 2026 at 7:20 am

    Call the function via File::Slurp::read_file instead of File::Slurp->read_file. In the latter case Perl’s object system comes into play, and the first argument passed to read_file will be the thing before the -> — meaning its first argument will be the string "File::Slurp" instead of the file name you actually want to read.

    That’s also why you call new on the packages you want to create a new instance from.

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

Sidebar

Related Questions

Could someone please tell me what I am doing wrong here. I have compiled
Here's my problem: I'm trying to parse a big text file (about 15,000 KB) and
Here's what I'm trying to do. I'm querying an XML file using LINQ to
I have a file on my desktop for test. I am trying to display
What could possibly go wrong with the following transaction if executed by concurrent users
I am not sure what I could be doing wrong that causes info level
OpenFileDialog^ dialog = gcnew OpenFileDialog; dialog->ShowDialog(); What could possibly be wrong with this? I'm
Could somebody explain what I'm doing wrong in attempting to insert a new UITableViewCell?
Could someone explain what I am doing wrong with my classes that my JTabbedPane
I could be not more sorry guys - the question was a very wrong

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.