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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:41:59+00:00 2026-05-16T06:41:59+00:00

If I have an array that contains multiple FLV files like so: my @src_files

  • 0

If I have an array that contains multiple FLV files like so:

my @src_files = qw (1.flv 2.flv 3.flv 4.flv 5.flv 6.flv 7.flv);

I can call flvbind.exe as an external commandline program to do the merging like so:

my $args = join(' ',@src_files);
my $dest_file = 'merged.flv';
system "flvbind $dest_file $args";

But the usage example for FLV::Splice is this:

use FLV::Splic; 
my $converter = FLV::Splice->new();
$converter->add_input('first.flv');
$converter->add_input('second.flv');
$converter->save('output.flv');

I seem to be unable to figure out how to do the same thing like the flvbind does.
Do I have to verbosely add every param like so:

use FLV::Splice;

my $dest_file = 'merged.flv';
my $converter = FLV::Splice->new();
$converter->add_input('1.flv');
$converter->add_input('2.flv');
$converter->add_input('3.flv');
$converter->add_input('4.flv');
$converter->add_input('5.flv');
$converter->add_input('6.flv');
$converter->add_input('7.flv');
$converter->save("$dest_file");

This does not look like the correct way. I mean do I have to verbosely add every param? Is there a way to simplify the repeated use of the add_input method? Any pointers? Thanks like always 🙂

UPDATE:
It turns out that this is a silly question. Thanks, @Eric for giving me the correct answer. I thought of using a for loop to reduce the repeated use of the add_input method but somehow I thought it would not work and I thought I was stuck. Well, I’ll be reminding myself not to easily bother other people next time.

  • 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-16T06:42:00+00:00Added an answer on May 16, 2026 at 6:42 am

    It’s fairly easy to reduce the repetition:

    $converter->add_input($_) for @src_files;
    

    Or wrap the whole thing in a subroutine:

    sub flv_splice {
        my $dest_file = shift;
        my $converter = FLV::Splice->new();
        $converter->add_input($_) for @_;
        $converter->save($dest_file);
    }
    
    flv_splice 'merged.flv', @src_files;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Array that contains some elements multiple times. Now I want to
I have an array that contains @sign in the object. I can't access that
I have a struct-array that contains details of different reports that can be run.
I have an array that contains the points for drawing multiple hills. When I
I have an array that contains multiple objects with many properties. I want to
I have an array result that contains multiple arrays. I need to grab all
I have a hashmap that contains multiple string arrays. I am trying to output
I have an array that contains the RGB colour values for each pixel in
I have an array that contains an array of arrays if that makes any
Lets say I have an array numbers that contains the following values: int numbers

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.