C:\cygwin64\home\Fred\pages2\hunt>perl lib6.pl GET https://search.yahoo.com/search [s] p= (text) =Search (submit) fr=sfp (hidden readonly) fr2= (hidden readonly) iscqry= (hidden readonly) search string is Yahoo News C:\cygwin64\home\Fred\pages2\hunt>type lib6.pl #! /usr/bin/perl use warnings; use strict; use 5.01; # create a new browser use WWW::Mechanize; my $browser = WWW::Mechanize->new(); # tell it to get the main page $browser->get('https://search.yahoo.com/'); # make sure $link is defined if ( defined $browser ) { $browser->dump_forms; my $brand = 'Yahoo'; my $collection = 'News'; my $search_string = "$brand $collection"; say "search string is $search_string"; my $url = $browser->uri; system( 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe', $url ); } else { use 5.01; $browser->back; say "tja"; my $url = $browser->uri; system( 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe', $url ); }