From chris at fedde.us Wed Sep 3 11:29:17 2014 From: chris at fedde.us (Chris Fedde) Date: Wed, 3 Sep 2014 19:29:17 +0100 Subject: [Denver-pm] WWW::Mech examples In-Reply-To: References: Message-ID: The most straight forward approach (assuming simple html interface) is to use WWW::Mechanize https://metacpan.org/pod/WWW::Mechanize On Mon, Aug 25, 2014 at 10:49 PM, Robert L. Harris < robert.l.harris at gmail.com> wrote: > > I'm working on a new script to pull some files off an internal company > app server. I'm trying to figure it out using some examples I've found > online but figured I'd ask. Anyone have a script that does something close > to this in a simple, easy to figure out manner: > > > Connect to http://apps.company.com > Submit 4 values into a form and hit submit. > * This triggers some dynamic output that runs for a few mins while it > generates some data then gives a link at the bottom. > Grab the link at the bottom > Download a .tgz off of the resulting link's page > > Robert > > > -- > :wq! > --------------------------------------------------------------------------- > Robert L. Harris > > DISCLAIMER: > These are MY OPINIONS With Dreams To Be A King, > ALONE. I speak for First One Should Be A Man > no-one else. - Manowar > > _______________________________________________ > Denver-pm mailing list > Denver-pm at pm.org > http://mail.pm.org/mailman/listinfo/denver-pm > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.l.harris at gmail.com Wed Sep 17 20:12:02 2014 From: robert.l.harris at gmail.com (Robert L. Harris) Date: Wed, 17 Sep 2014 21:12:02 -0600 Subject: [Denver-pm] Detecting if a set of dirs exists? Message-ID: Given: $Path = "/some/path/to/*/0[6789]/my/files/file.txt" do: open(INPUT, "/bin/ls -1 $Path |"); while() { Do stuff } I want to do a return or exit if $Path doesn't have any directories. I tried doing a : next if ( ! -d $Path ); but it doesn't like the 2 wildcards. Thoughts? Robert -- :wq! --------------------------------------------------------------------------- Robert L. Harris DISCLAIMER: These are MY OPINIONS With Dreams To Be A King, ALONE. I speak for First One Should Be A Man no-one else. - Manowar -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.l.harris at gmail.com Fri Sep 19 12:40:21 2014 From: robert.l.harris at gmail.com (Robert L. Harris) Date: Fri, 19 Sep 2014 13:40:21 -0600 Subject: [Denver-pm] WWW::Mechanize and MS Project Server? Message-ID: I'm trying to automate getting a directory listing and some files from a MS project server. I have this: my $mech = WWW::Mechanize->new() || die "Couldn't set new $!"; # $mech->credentials($User,$Pass); $mech->credentials( $TopURL, '', $User, $Pass); $mech->cookie_jar(HTTP::Cookies->new( file =>"mechcookies.txt", autosave => 1)); $mech->get($TopURL) || die "Couldn't get Top :$!:"; I have verified $TopURL, $User and $Pass. Whenever I run the code it throws an error that I'm unauthorized. Any ideas? Robert -- :wq! --------------------------------------------------------------------------- Robert L. Harris DISCLAIMER: These are MY OPINIONS With Dreams To Be A King, ALONE. I speak for First One Should Be A Man no-one else. - Manowar -------------- next part -------------- An HTML attachment was scrubbed... URL: