Search Results

Search found 4 results on 1 pages for 'perlnoob'.

Page 1/1 | 1 

  • How can I call winrar in perl on windows

    - by perlnoob
    Is it possible to call winrar through perl on a windows system, such as perl -e "rar a -rr10 -s c:\backups\backup.rar @backup.lst" If so, is there a more efficient way to do this? I've looked up "perl -e" +winrar on google, however none of the results gave me any answer that was remotely close to what i was looking for. The system Im running this on is a Windows XP system. Im open to doing this in another language like python if its easier, however I am more comfertable with perl.

    Read the article

  • Rename a file with perl

    - by perlnoob
    I have a file in a different folder I want to rename in perl, I was looking at a solution earlier that showed something like this: for (<backup.rar>) { my $file = $_; my $new = $_ 'backup'. @test .'.rar'; rename $file, $new or die "Error, can not rename $file as $new: $!"; } however backup.rar is in a different folder, I did try putting "C:\backup\backup.rar" in the < above, however I got the same error. C:\Program Files\WinRARperl backup.pl String found where operator expected at backup.pl line 35, near "$_ 'backup'" (Missing operator before 'backup'?) syntax error at backup.pl line 35, near "$_ 'backup'" Execution of backup.pl aborted due to compilation errors. I was using # Get time my @test = POSIX::strftime("%m-%d-%Y--%H-%M-%S\n", localtime); print @test; To get the current time, however I couldn't seem to get it to rename correctly. What can I do to fix this? Please note I am doing this on a windows box.

    Read the article

  • Perl, regex, extract data from a line

    - by perlnoob
    Im trying to extract part of a line with perl use strict; use warnings; # Set path for my.txt and extract datadir my @myfile = "C:\backups\MySQL\my.txt"; my @datadir = ""; open READMYFILE, @myfile or die "Error, my.txt not found.\n"; while (<READMYFILE>) { # Read file and extract DataDir path if (/C:\backups/gi) { push @datadir, $_; } } # ensure the path was found print @datadir . " \n"; Basically at first im trying to set the location of the my.txt file. Next im trying to read it and pull part of the line with regex. The error Im getting is: Unrecognized escape \m passed through at 1130.pl line 17. I took a look at http://stackoverflow.com/questions/1040657/how-can-i-grab-multiple-lines-after-a-matching-line-in-perl to get an idea of how to read a file and match a line within it, however im not 100% sure I'm doing this right or in the best way. I also seem to produce the error: Error, my.txt not found. But the file does exist in the folder C:\backups\MySQL\

    Read the article

  • Excel and SQL, order by help

    - by perlnoob
    Im stuck in Excel 2007, running a query, it worked until I wanted to add a 2nd row containing "field 2". Select "Site Updates"."Posted By", "Site Uploaded"."Site Upload Date" From site_info.dbo."Site Updates" Where ("Site Updates"."Posted By") AND "Site Uploaded"."Site Upload Date">={ts '2010-05-01 00:00:00'}), ("Site Location"='Chicago') Union all Select "Site Updates"."Posted By", "Site Uploaded"."Site Upload Date" From site_info.dbo."Site Updates" Where ("Site Updates"."Posted By") AND "Site Uploaded"."Site Upload Date">={ts '2010-05-01 00:00:00'}), ("Site Location"='Denver') Order By "Site Location" ASC; Basically I want 2 different cells for the locations, example name - Chicago - denver user1 - 100 - 20 user2 - 34 - 1002 Right now for some odd reason, its combining it like: name - chicago user1 - 120 user2 - 1036 Please note updating to 2010 beta is not a viable option for me at this point. Any and all input that will help me is greatly apprecaited. I have read over http://www.techonthenet.com/sql/order_by.php however its not gotten me very far in this question. If you have another SQL resource you recomend for people trying to get their feet wet, I'd greatly apprecaite it. If it helps all the info is on the same table.

    Read the article

1