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

  • Home
  • SEARCH
  • 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 8301607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:01:22+00:00 2026-06-08T17:01:22+00:00

As per below script, Trying to give two Input files. Test_DDD111_20120731.csv and DDD111.txt. Inside

  • 0

As per below script, Trying to give two Input files. Test_DDD111_20120731.csv and DDD111.txt.
Inside one folder this Test_DDD111*.csv file with different date will be available. I want to give only current date file as input inside this script.

I assign date as $deviationreportdate. But i am getting error, can anyone help me to solve this problem.

Error which i am getting:

Scalar found where operator expected at subscriberdump.pl line 58, near "/Test_DDD(\d+)/${deviationreportdate}"
        (Missing operator before ${deviationreportdate}?)
        syntax error at subscriberdump.pl line 58, near "/Test_DDD(\d+)/${deviationreportdate}"
        Execution of test.pl aborted due to compilation errors.

#!/usr/bin/perl

use strict;
use warnings;

use strict;
use POSIX;

my @array123;

my $daysbefore;
my %month="";

my ($f2_field, @patterns, %patts, $f2_rec);


while (@ARGV)

{
  my $par=shift;

  if( $par eq "-d" )

  {

    $daysbefore=shift;

    next;
  }
}

sub getDate
{
        my $daysago=shift;

        $daysago=0 unless ($daysago);

        my @months=qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);

        my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = 

Localtime(time(86400*$daysago));

        # YYYYMMDD, e.g. 20060126

        return sprintf("%d%02d%02d",$year+1900,$mon+1,$mday);
}

my $deviationreportdate=getDate($daysbefore-1);

my $transactiondate=getDate($daysbefore);

my $filename="output.txt");

open(OUTPUTFILE,"> /tmp/$filename");

for my $Test_file (<Test_DDD*${deviationreportdate}*>) 

{

  if ($Test_file =~ /Test_DDD(\d+)/${deviationreportdate}*) 

{

    my $file = "DDD$1.txt";

    my $ID="DDD$1"; 

    open AIN, "<$file"    or die($file);

    open BIN, "<$Test_file" or die($Test_file);

    my %seen;
}
  • 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-08T17:01:23+00:00Added an answer on June 8, 2026 at 5:01 pm

    This regular expression is invalid

    $Test_file =~ /Test_DDD(\d+)/${deviationreportdate}*

    you can only have modifiers after the last slash in a regex. I’m not exactly sure what you’re trying to do with this, otherwise I would post the correct regex for you. maybe you ment this?

    $Test_file =~ /Test_DDD(\d+)\/${deviationreportdate}*/

    or this

    $Test_file =~ /Test_DDD(\d+)${deviationreportdate}*/

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

Sidebar

Related Questions

For example the mega menu looks like as per below site example http://www.javascriptkit.com/script/script2/jkmegamenu.shtml
Asp.net team had designed script manager such that only one instance existed per page(HttpHandler),
Hey, I am trying to get the class names dynamically for the script below.
The script below works perfectly. However, it's not quite what I'm trying to achieve.
I have written a little bash script that reads commands (one per line), in
I have one python script which i am trying to convert and stuck in
I have a set of code as per below. The point is to have
I need to implement an MVC site with urls per below: category1/product/1/wiki category1/product/2/wiki category1/sub-category2/product/3/wiki
Per the code below, I am getting the following message. I am fairly certain
When making an HttpWebRequest within a CLR stored procedure (as per the code below),

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.