Forum: Perl 15 Days Ago |
| Replies: 2 Views: 4,694 I would suggest using OLE instead. It is much more flexible and you can do just about anything. What I do is record a macro in Excel (or another MS app) and "convert it to perl (replacing the dots... |
Forum: Perl Oct 7th, 2009 |
| Replies: 1 Views: 808 This is the best book I know of that deals with windows system admin via perl:
http://www.amazon.com/Win32-Perl-Scripting-Administrators-Handbook/dp/1578702151/ |
Forum: Perl Oct 6th, 2009 |
| Replies: 2 Views: 560 Try system("c:\\windows\\win32\\wget"); |
Forum: Perl Oct 6th, 2009 |
| Replies: 2 Views: 458 This will work in one of two ways
Change to:
my var1="C:\\\\temp";
And the do what you're doing.
Or, change to
my var1="C:/temp"; |
Forum: Perl Aug 3rd, 2009 |
| Replies: 1 Views: 365 Have you tried loading the entire file into a variable for searching? You can do this by:
undef($/);
open(FILE,"<file.txt");
while(<FILE>){
$allfile=$_;
} |
Forum: Perl Jun 12th, 2009 |
| Replies: 7 Views: 854 I am surprised that you got this program to run at all.
$my @t = split (/\s+/); #split sentences into "words"
$words ++;= @t; #add count to $words
These two lines contain syntax errors. ... |
Forum: Perl Jun 7th, 2009 |
| Replies: 4 Views: 499 Thanks Kevin! I was gonna post the same thing! |
Forum: Perl Jun 5th, 2009 |
| Replies: 3 Views: 657 I apologize in advance for back-posting. I meant HTML::Parser
HTML::Parse is deprecated |
Forum: Perl Jun 5th, 2009 |
| Replies: 3 Views: 657 Look into HTML::Parse. It is event driven and tag driven. You create functions when a tag opens or closes and how to deal with it. Play around with it and see if you can more effectively parse HTML... |
Forum: Perl Jun 5th, 2009 |
| Replies: 4 Views: 499 What protocol are you using to copy the files? I like lwp-download.pl which can be used to copy a file via HTTP. |
Forum: Perl Jun 5th, 2009 |
| Replies: 1 Views: 641 You are not using Getopt::Std properly. If you want command line switches you can use Getopt and then say:
getopts("a:b:u:hs");
for example. That will automatically put -a data into the... |
Forum: Perl May 11th, 2009 |
| Replies: 4 Views: 689 What uid is the Tomcat Server running as? What uid are you running at the command prompt? You might try an su to the uid of the Tomcat server and see if the script runs. You might have to change... |
Forum: Perl May 11th, 2009 |
| Replies: 1 Views: 407 Could you explain what you are trying to do a little better. When you say "through an alignment" what exactly do you mean? Is it two arrays of numbers, characters or two sequences in a file (or two... |
Forum: Perl May 1st, 2009 |
| Replies: 3 Views: 1,036 use OLE;
use Win32::OLE::Const 'Microsoft Excel';
my($xapp) = CreateObject OLE 'Excel.Application' || die $!;
$xapp->{'Visible'} = 1;
# Open the excel file
$wkb =... |
Forum: Perl Mar 11th, 2009 |
| Replies: 7 Views: 2,115 It would seem to me that you would want a server process to post to paypal and have your client process wait for notification that the paypal server transaction completed. That's what I would do. The... |
Forum: Perl Feb 13th, 2009 |
| Replies: 8 Views: 764 Hey understood. I was GOING to actually write the code... but... I decided to just put in the concept... with no code. I wrote the actual code in my head on my walking to the train today - HOWEVER...... |
Forum: Perl Feb 13th, 2009 |
| Replies: 4 Views: 769 Well, I looked around CPAN to see if there are new modules for the new format, and there aren't any yet. There are some for XML-based spreadsheets, but those are OLD. I guess someone will have to... |
Forum: Perl Feb 13th, 2009 |
| Replies: 8 Views: 764 Load the original file into array with push. Go through the array X number of times. Look for each line containing FILEX and skip the ones containing FILEY. Then write out the array to new files.... |
Forum: Perl Feb 11th, 2009 |
| Replies: 19 Views: 1,297 I have always had more success at the cmd line (for windows) with perl using "\\path\\file.txt" However, in a web environment (at least if you're running apache for windows) "/path/file.txt" works... |
Forum: Perl Feb 11th, 2009 |
| Replies: 19 Views: 1,297 Interesting. Like I said, I have cygwin installed and it gives me the unix commands (ls, grep, pwd, etc.) and it gives me bash in dos/windows. I always thought that that was why I got / to work. I... |
Forum: Perl Feb 11th, 2009 |
| Replies: 4 Views: 769 No, no mistake. I may have typed the output wrong (I'll have to check it - it is a pointer to a handle of the graph) but what I do is create a 120 page powerpoint document with ms-graph and... |
Forum: Perl Feb 10th, 2009 |
| Replies: 19 Views: 1,297 Comatose,
You are correct at the shell level. - windows does NOT do that. I use the double backslashes in a file path because I usually set a data or file path (like $DATAROOT="\\a\\b\\c") and... |
Forum: Perl Feb 10th, 2009 |
| Replies: 4 Views: 769 Hi,
This is my first question in the forum and I was wondering if anyone knew the answer. For the past 8 years or so, I have been using OLE to transfer information between perl and excel and... |
Forum: Perl Feb 10th, 2009 |
| Replies: 19 Views: 1,297 Yeah I use the forward slash "/" in windows as well and windows/perl supports it. One thing I HAVE found is that Apache for windows is the only app I have come across that supports directory (or... |
Forum: Perl Feb 10th, 2009 |
| Replies: 19 Views: 1,297 I find this open statement interesting... I always do something like this:
open(INFH,"<\\full\\path\\to\\gettysburgh.txt") #on windows
open(INFH,"</full/path/to/gettysburgh.txt") #on unix
... |
Forum: Perl Feb 6th, 2009 |
| Replies: 11 Views: 1,180 Cool for you. I lived in LA in 1985. Now I live in NYC. I try to help - those perl monks are probably beyond me - hehe. I said I am the CIO of 20 firms - that is a typo - I am the CIO of 200 firms. I... |
Forum: Perl Feb 6th, 2009 |
| Replies: 11 Views: 1,180 well hey good for you. I have 4 kids - 17, two 12 year old twins and a five year old. I don't really have time, but I'd love to share back. If I could help more I would. I am a CIO of 20 firms and I... |
Forum: Perl Feb 6th, 2009 |
| Replies: 11 Views: 1,180 Well, hey, I don't have time (and nor do you i expect) to respond to posts - haha. I have looked at perlmonks and briefly at tek-tips but the reality is I'm busy (as I am sure you are). I rarely... |
Forum: Perl Feb 6th, 2009 |
| Replies: 11 Views: 1,180 Really - well too bad for him/her/them. I hope that they have "replies on" and get notification. I wonder how many people here have used Mason? Have you Kevin? It's pretty dang cool - part scripting,... |
Forum: Perl Feb 6th, 2009 |
| Replies: 11 Views: 1,180 Frankly, I would probably use Javascript for a solution to your problem; however, let me tell you what I have done in the past for your very issue. I used Mason a lot - which is sort of like a perl... |
Forum: Perl Feb 5th, 2009 |
| Replies: 9 Views: 1,523 Yeah, I find that interesting as well. Perl is amazing - thanks Larry!
I told a co-worker that I use perl everyday and he said "I hate that language" so I immediately lost all respect for him... |
Forum: Perl Feb 5th, 2009 |
| Replies: 4 Views: 1,174 Thanks for the welcome. I was just looking through threads in which no one had posted an answer and wasn't looking at activity. I just joined Daniweb this week, because I had a system problem and... |
Forum: Perl Feb 5th, 2009 |
| Replies: 9 Views: 1,523 Well, I would normally have left the named array off and just done it with a simple scalar, but since the questioner is a newbie to perl, I wanted to show where the values end up when you use () and... |
Forum: Perl Feb 5th, 2009 |
| Replies: 4 Views: 1,174 open(FILE,"<test.txt");
$compare=$ARGV[0]; # this takes the compare on the command line
while(<FILE>){
chomp;
$x++;
next if($x==1); #this skips the label at the top
($n,$value)=split(/\s/);... |
Forum: Perl Feb 5th, 2009 |
| Replies: 4 Views: 949 Alright, I know I'm not supposed to back post. But I realized my suggestion was incorrect (sorry, still getting the hang of this). I meant $/ not $|.
undef($/);
which will set the end of... |
Forum: Perl Feb 5th, 2009 |
| Replies: 2 Views: 1,730 Personally, I love the Date::Manip module which can format and read just about any date format.
http://search.cpan.org/~sbeck/Date-Manip-5.54/lib/Date/Manip.pod
But it is rather large. |
Forum: Perl Feb 5th, 2009 |
| Replies: 9 Views: 1,523 OK, will do. Sorry. I am new to these forums, but not new to perl. I will edit in the future. My bad. |
Forum: Perl Feb 5th, 2009 |
| Replies: 4 Views: 1,137 Use an HTTP Cookie from the perl module mentioned above and set an expiration date into the future. That will store the cookie on the client's machine and it will retransmit it to your server. But... |
Forum: Perl Feb 5th, 2009 |
| Replies: 7 Views: 2,196 I use perl on Windows daily. If it is a mapped drive it will not fail. the file system functions work perfectly (chdir, copy, mkdir, etc.) on Windows but you have to either use a front slash (as you... |
Forum: Perl Feb 5th, 2009 |
| Replies: 2 Views: 830 Personally if these arguments are operators or switches I like to use Get::Opts which converts the operators to $opt_[letter] and can get switches as well as values. |