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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:04:31+00:00 2026-05-28T22:04:31+00:00

Binding a regexp to a parameter in perl, I’m getting the following error: syntax

  • 0

Binding a regexp to a parameter in perl, I’m getting the following error:
syntax error at ./ctime.pl line 23, near "/^\((\d{2}):(\d{2})\)/)"
Execution of ./ctime.pl aborted due to compilation errors.

Here is the line where I try to bind it:

$_[0] =~ /^\((\d{2}):(\d{2})\)/)/;

I’m trying to match an hours/minutes combination in parens, such as (99:99 or (01:24). There will always be four digits.

  • 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-05-28T22:04:32+00:00Added an answer on May 28, 2026 at 10:04 pm
    $_[0] =~ /^\((\d{2}):(\d{2})\)/)/;
    

    should be

    $_[0] =~ /^\((\d{2}):(\d{2})\)/;
    

    You accidentally duplicated two characters near the end of the line.


    PS — As a note of caution, you’ll have problems if you try to pass $1 or the like as an argument to function that contains this code because you use $_[0] directly.

    sub f {
       print("$_[0]\n");              # a
       print $_[0] =~ /a/ ?1:0,"\n";  # 1
       print("$_[0]\n");              # [empty string]
       print $_[0] =~ /a/ ?1:0,"\n";  # 0
    }
    'a'=~/(.)/;
    f($1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When binding a DataGridView control to a binding source, I'm getting the following error
1) Binding to The following populates a READ ONLY WinFrms grid: Dim query =
The Binding syntax, {Binding /} , works in WPF but does not work at
Which binding should I choose to enable sessions following is my service interface: [ServiceContract(SessionMode=SessionMode.Required)]
I'm using System.Data.OracleClient which does parameter-binding by name and are verifying that CommandText and
I am binding dropdown list using Object data source. I got an error like
When binding a NSArrayController, I see the following bindings available under controller content tab
Binding a List collection to a datagrid. How can you limit what properties will
When Binding a GridView to a DataTable, How can we Change the value displayed
When binding multiple variables value1 value2 value3 in the same text field, do I

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.