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 ?
User Profile
Collapse
-
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... -
-
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";
like this
C:\Perl\duratio n.pl
But I want it only to display this "C:\Perl\"
Any clues ? I know this is... -
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;
Leave a comment:
-
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 ?Leave a comment:
-
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 dewLeave a comment:
-
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"; } #
-
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'),
-
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.Leave a comment:
-
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...Leave a comment:
-
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"
-
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.Leave a comment:
-
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=
Leave a comment:
-
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
-
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");
Is there any other way to open vlc player?
ok, I changed my code
Here is it
Code:#!usr/bin/perl #exec (vlc);
-
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. :)Leave a comment:
-
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 -
-
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...
No activity results to display
Show More
Leave a comment: