I suspect that you're using this code in a loop.
If that's the case then the function you need is next. It's up to you to determine the logic you need to test if a cell is blank.
- Miller
User Profile
Collapse
-
The following script will match at least this example data:
Code:use strict; use warnings; my $string_1 = do {local $/; <DATA>}; my $string_2 = "regelkonformen Handeln der Nachkommen (Berger/Luckmann 2007, 62–72)."; # Build a regex to match HTML interjected at whitespace my $string2_re = join '(?:\s+|<(\w+)\b.*?</\g{-1}>)+', map quotemeta, split
Leave a comment:
-
You have a bug in your script because you reuse the $worksheet variable.
It honestly looks like you just copy and pasted this code from somewhere without actually reading it.
The following will get you closer to where you want to be, but I haven't not yet finished the script. It will be up to you to put the final touches on it:
Code:use strict; use warnings; use Spreadsheet::ParseExcel;
Leave a comment:
-
As RonB pointed out, you aren't checking to see if system succeeded. According to perldoc system, a true return value would actually be an indication of failure. If you don't want to worry about explicitly checking for success, use the autodie pragma.
Code:use strict; use warnings; use autodie qw(:all); my $mesh_base = '/mnt/jffs2/conf/mesh_start"' system($mesh_base);
Leave a comment:
-
Steps for finding a solution:
- Step 1: google: How to open vlc player using perl script
- Step 2: The 5th item links to the official videolan forums saying - VLC Perl Module + VLC Telnet Interface = WIN.
- Step 3: Following that info brings us to - cpan VideoLan::Clien t
I don't know if that module will be able to help you with your specific project, but it's the first place I would start.
- MillerLeave a comment:
-
Hi guru151,
I want to extract meaningful information from your post/question.
Please help me out.
- MillerLeave a comment:
-
The following article by KevinADC is a decent place to start learning about CGI and at least getting a single example to work:
http://bytes.com/topic/perl/insights...pm-module-perl
- Miller...Leave a comment:
-
<STDIN> is always going to return you a single value. Hashes take key value pairs, so you'd need at least 2 values to initialize your hash. You could do this properly in one of two ways, you could either get the key value pairs in separate input statements, or you could parse the single input and separate the values. Given that you're new, I'd suggest doing the former:
Code:use Data::Dumper; use strict;
Leave a comment:
-
You're indicating the content time image/gif, but the content you're actually outputting is text/html. If you actually want to send an image, then you must send the contents of that image out after the header:
Code:use File::Copy; print "Content-type: image/gif\n\n"; copy "/path/to/image.gif", \*STDOUT;
Leave a comment:
-
kumeperl,
Look at my earlier post and link to perlfaq4. You're currently only testing for the existence of a slash in the string, not for the exact count.
- MillerLeave a comment:
-
Check out perlfaq4 - How can I count the number of occurrences of a substring within a string:
Code:use strict; use warnings; my @list = "C:\\username\\Sources"; for my $arrchar (@list) { print "array element = $arrchar"; my $slashes = () = $arrchar =~ /\\/g; if ($slashes) { print "\nfound $slashes\n"; } }
Leave a comment:
-
Why do you want this output?
Code:aaaa bbbb bbbb ccccc cccc dddd
- MillerLeave a comment:
-
If you're having trouble with Win32::OLE, you can always try using Spreadsheet::Pa rseExcel and Spreadsheet::Wr iteExcel. It would definitely require a bit of programming to accomplish what you describe, but I'm sure it's doable.
- MillerLeave a comment:
-
Thanks for the info. Additionally, one could use Image Magick to merge the related tiffs into a single image.
- MillerLeave a comment:
-
This is not strictly a perl question mate.
This is a question about networking and how to access a file on a windows machine via a linux box. Do it at the command prompt first, and then just transfer the method that works there to your perl script.
- MillerLeave a comment:
-
1) Use Text::CSV to process the csv files.
2) Load the file with details into a hash keyed by user id.
3) Loop through other file, creating a new csv file with the details pulled from the hash.
4) Profit!
- MillerLeave a comment:
-
I suspect that your code does not do what you want.
You need to either save the results of the 2nd query so that you can loop through them multiple times for each record in the 1st query, or you need to reset your 2nd query during each iteration of the first.
- MillerLeave a comment:
-
1) Use LWP to download the webpage that actually links to the file.
2) Parse that file to determine the current resource version
3) Download that file if it's different from the previously downloaded resource.
- MillerLeave a comment:
-
Code:my $var1 = "ab_domino_1.xml"; $var1 =~ s/\.xml$/.jpg/; print $var1;
Leave a comment:
-
There are a few problems with your script, but the biggest one is that your file appears to contain relative paths, but you're assuming they contain absolute paths.
I also suggest you use the Cwd module to get the current working directory and use better error checking. The below script will probably get you on your way:
Code:use Cwd qw(getcwd abs_path); use File::Spec; use strict; use warnings;
Leave a comment:
No activity results to display
Show More
Leave a comment: