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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:47:45+00:00 2026-06-06T07:47:45+00:00

thank you for reading. For a shell command to wget, something like this works:

  • 0

thank you for reading.

For a shell command to wget, something like this works:

wget -q -O - http://www.myweb.com | grep -oe '\w*.\w*@\w*.\w*.\w\+' | sort -u

However, when I try to insert that command inside the Perl program, then I get a syntax error referring to “backslashes found where operator expected, bareword found where operator expected”. So I replaced the quotes that surround the regex by this {} but, what that does is just like commenting it out, it does not bring the error, but it is as if the regex weren’t, so obviously the curly braces are a wrong attempt.

This is the code, it is inside a foreach:

foreach(@my_array) {

$browser->get($_);
# and here below is where the error comes
system ('wget -q -O -"$_" | grep -oe '\w*.\w*@.\w*.\w\+' | sort -u');

If I replace the single quotes wrapping the regex by {}, then wget does get the URLs but the grep command does not act.

So that is the issue, how to resolve the quotes annoying the syntax

  • 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-06T07:47:46+00:00Added an answer on June 6, 2026 at 7:47 am

    You want this:

    system ("wget -q -O -\"$_\" | grep -oe '\\w*.\\w*@.\\w*.\\w\\+' | sort -u");
    

    You can include what you like within double quotes, only you have to escape certain characters.

    Incidentally, Perl’s qq() operator might interest you. You can look it up.

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

Sidebar

Related Questions

First, thank you for reading this. I am just starting php and I am
thank you for taking the time and interest reading this and hopefully helping me
First and foremost, thank you all for reading this and helping, I'm very grateful.
I'm using django non-rel ( http://www.allbuttonspressed.com/projects/django-nonrel ) and am trying to delete all the
Inside my Shell Script , i have this line present RUN_CMD=$JAVA_HOME/bin/java -cp $CLASSPATH com/mypack/BalanceRunner
Inside my Shell Script , i have this line present RUN_CMD=$JAVA_HOME/bin/java -cp $CLASSPATH com/mypack/BalanceRunner
Thank you very much in advance for reading. I'm programming a web application in
Thanks for reading this. I have no idea why this is throwing a NullReferenceException
Firs of all thanks for reading this. I'm having trouble updating the progress from
This question is increasingly esoteric, as we generally migrate away from text-based email reading.

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.