User Profile

Collapse

Profile Sidebar

Collapse
Srijith B
Srijith B
Last Activity: Oct 5 '11, 07:23 AM
Joined: Jan 3 '11
Location: india
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • HI miller , you said
    "Parse that file to determine the current resource version"

    Is it possible to determine the time stamp of that page instead determining the resource version ?
    See more | Go to post

    Leave a comment:


  • How to download a file with string in name using perl

    Im trying to write a perl code to do the following task.

    I have a website which is located in a diffirent country.
    I want to download a file from that site everyday.
    The file name keeps on changing everyday.
    say the file name is CTP-latest-5.3.0.37.iso
    next day it may change to "CTP-latest-5.3.0.38.iso" or remain same.

    I want to download only if the version number (ie. 38 in...
    See more | Go to post

  • Srijith B
    replied to Print file information using ffmpeg in perl
    in Perl
    Ya i got it right..
    thanks for your time..
    See more | Go to post

    Leave a comment:


  • Srijith B
    started a topic Print the current directory
    in Perl

    Print the current directory

    Hi I have this code to print the current directory using Perl

    Code:
    use Cwd qw(abs_path);
    my $path = abs_path($0);
    print "$path\n";
    But it is displaying my perl source code file along with the directory.

    like this

    C:\Perl\duratio n.pl


    But I want it only to display this "C:\Perl\"

    Any clues ? I know this is...
    See more | Go to post

  • Srijith B
    replied to Print file information using ffmpeg in perl
    in Perl
    Is ther any problem with the search patter here
    Code:
    # if (m!Duration: ([0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9])!) {
    #             $finfo{'duration'} = $1;
    See more | Go to post

    Leave a comment:


  • Srijith B
    replied to Print file information using ffmpeg in perl
    in Perl
    hey.. thanks.. I fixed it and its now able to detect the file.
    And I am getting other values also.. But Why is the duration still showing 00:00:00.00 ?
    See more | Go to post

    Leave a comment:


  • Srijith B
    replied to Print file information using ffmpeg in perl
    in Perl
    well. did u try running this in ur windows ? do you have a solution ?

    Actually this is working fine for me in Linux machine. So i don't think that is the problem.( with path to ffmpeg changed and after replacing C:\top.txt with /dev/null/)

    Please give me a solution as today is the dew
    See more | Go to post

    Leave a comment:


  • Srijith B
    started a topic Print file information using ffmpeg in perl
    in Perl

    Print file information using ffmpeg in perl

    I am trying to print file information using ffmpeg tool in perl

    Here is my code
    Code:
    use strict;
    use warnings;
    
    use IPC::Open3;
    
    # example
    my $filename  = $ARGV[0];
    my %videoInfo = videoInfo($filename);
    for (qw(duration durationsecs bitrate vcodec vformat acodec asamplerate achannels)) {
    	print "$_: " . $videoInfo{$_} . "\n";
    }
    
    #
    ...
    See more | Go to post
    Last edited by miller; Apr 15 '11, 05:53 PM. Reason: perl tidy

  • Srijith B
    started a topic Generate random names
    in Perl

    Generate random names

    HI all
    I am trying to write a perl script to generate random names ed. ( Qrhfh, Jdfhdh, Dfkjns) etc.

    So the script should ask me the number of random names and when I give say 4, It should give me four random names and then it should insert these names into the sql database to a table which is already created.

    Here is my code.

    Code:
    #!/usr/bin/perl
    my $name;
    my @charset = (('A'..'Z'),
    ...
    See more | Go to post

  • Srijith B
    replied to How to Automate VLC player in perl?
    in Perl
    sorry for not mentioning the OS.
    I am using Linux ubuntu.
    I have a well running vlc automation script in windows.
    And yes, I used the same package as the above(Win32::Pr ocess).
    But you know that we cant use these in linux.

    I am unaware of packages in linux that is to be used.
    See more | Go to post

    Leave a comment:


  • Srijith B
    replied to How to Automate VLC player in perl?
    in Perl
    I dont want to wait after I run vlc. I want the below statements to execute after the vlc is opened.
    what I get is
    The VLC will open and a message "[0x9bfa140] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface." appears in the terminal and the program is waiting for vlc to quit. once the vlc quits(CTRL +C or close vlc using mouse) the rest of the statements execute. Btw I tried forking...
    See more | Go to post

    Leave a comment:


  • Srijith B
    started a topic Calling Perl in actionscript.

    Calling Perl in actionscript.

    How can I call a perl code(say auto.pl) in actionscript ?

    I have a mxml script, and when the button is clicked, I want the perl script to be called.

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Introductory Flex 3 example, DKS, TECFA, University of Geneva, nov 2010) -->
     <mx:Application 
         xmlns:mx="http://www.adobe.com/2006/mxml"
    ...
    See more | Go to post

  • Srijith B
    replied to How to compare two files in perl?
    in Perl
    ok. Sorry for the inconvenience.
    Here is what i am trying to do
    Compare line1 of file1 with all the lines of file2. If a match is found(eg:"hello , how ru?" line of file1 matches with a line of file2) print that matched line to a different file.
    See more | Go to post

    Leave a comment:


  • Srijith B
    replied to How to compare two files in perl?
    in Perl
    I mean I want to compare two lines for equality. I want to compare each line in file1 to all the lines of file2.

    Here is a new code
    Code:
    #!/usr/bin/perl 
    
    $file1 = 'log.txt'; 
    
    $file2 = 'log1.txt';
    
    $odd_file1 = 'output_odd1.txt';
    
    $even_file1 = 'output_even1.txt';
    
    $odd_file2 = 'output_odd2.txt';
    
    $even_file2 = 'output_even2.txt';
    
    $output_file=
    ...
    See more | Go to post

    Leave a comment:


  • Srijith B
    started a topic How to compare two files in perl?
    in Perl

    How to compare two files in perl?

    I have two files and I want to compare the first line of file1 to each lines of file2 and once it is done, next compare second line of file1 to each line of file2. So we a match is found, print that line to a new text file.

    I tried and getting wired results
    this is my code
    Code:
     #!/usr/bin/perl
    $file1 = 'log.txt';
    $file2 = 'log1.txt';
    open(FILE1,"<$file1") || die ("Could not
    ...
    See more | Go to post

  • Srijith B
    started a topic How to Automate VLC player in perl?
    in Perl

    How to Automate VLC player in perl?

    I want to write a code in perl which automatically opens vlc player and start playing.

    I am stuck when I open the vlc player.
    I use

    Code:
    SYSTEM("vlc");
    But when I execute the lines below this code doesn't not execute.
    Is there any other way to open vlc player?

    ok, I changed my code
    Here is it

    Code:
    #!usr/bin/perl
    
    #exec (vlc);
    ...
    See more | Go to post

  • Srijith B
    replied to Disk Maintenance using Perl ?
    in Perl
    Yup! I did. But once I got the solution by myself, I wanted to remove the whole question, but I couldn't. So I removed the code. :)
    See more | Go to post

    Leave a comment:


  • Srijith B
    started a topic Open VLC in Perl ?
    in Perl

    Open VLC in Perl ?

    i need a perl script to :

    --> open vlc and play a 5 min mp3
    --> pause after 2 minutes and ask whether to continue
    --> if pressed "y" continue play
    --> else close vlc
    Thank you
    See more | Go to post

  • Srijith B
    replied to Disk Maintenance using Perl ?
    in Perl
    dont mind... I got the solution!!
    See more | Go to post

    Leave a comment:


  • Srijith B
    started a topic Disk Maintenance using Perl ?
    in Perl

    Disk Maintenance using Perl ?

    Hi,
    I have a code which maintains a certain partition in of my SD card.
    The code will
    -> Warn if the free space is less than 2%
    -> Else prints a complement statement

    I want the program to print these details only when a copying or moving operation is done.



    I have kept a infinite while loop, so that the program keeps on checking the disk, But display messages only when there...
    See more | Go to post
No activity results to display
Show More
Working...