473,395 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Search within a variable

Hi ! I'm new to Perl and this group so any help is welcome. I've
look around the groups a lot but I can't seems to find what I need.

I have to do a script that connects to a specific web page and search
it's source code for some words. Now, the script is able to connect
to the page, print the source on screen but when I try to search, it
seems like I don't have the right parameters.

Let's look :

----------------------------------------------------
#!c:\perl\bin\perl.exe

use Win32::Internet;
$Connection = Win32::Internet->new();

print "Content-type: text/plain\n\n\n";

$url = "http://www.mydomain.com";

$INET = new Win32::Internet();
$file = $INET->FetchURL("$url");

print "Here's the web address : $url\n";
print "And here's the source code : \n\n\n$file\n\n";
----------------------------------------------------

The content of the variable $file is the source code right !
I need to do a search within the $file variable.

I tried two things I found in a book :
$canvas->find("word");
$hostindex = $text->search(-nocase, -count => \$combien, word);

It doesn't work at all when I try to print the content. I need to
know how to specify the variable in which I want the search to be
done. I don't know if you guys can understand what I mean ...
Can anybody help please ?
Thanks a lot !
Jul 19 '05 #1
0 2258

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: phpkid | last post by:
Howdy I've been given conflicting answers about search engines picking up urls like: http://mysite.com/index.php?var1=1&var2=2&var3=3 Do search engines pick up these urls? I've been considering...
1
by: Compkitty | last post by:
Hi, I'm sort of new to Stored Procedures; and I'm building a search page where there are 9 parameters the user can put in; as little as 1, at most 9.. then it runs the Stored P and looks at the...
39
by: Noticedtrends | last post by:
Can inference search-engines narrow-down the number of often irrelevant results, by using specific keywords; for the purpose of discerning emerging social & business trends? For example, if...
4
by: Tarique Jawed | last post by:
Alright I needed some help regarding a removal of a binary search tree. Yes its for a class, and yes I have tried working on it on my own, so no patronizing please. I have most of the code working,...
32
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
1
by: Brian | last post by:
Hello I am trying to implement 'Search' (Basic Keyword search) functonality on a site. Home page has a search text box and a 'GO' button. When users will type in a keyword and presses 'GO', URL...
2
by: WesternCanuk | last post by:
Hello all. i'm new to mysql and a but of advice would be fantastic. I"m building a PHP website where i'm have problems getting my search query to work. I have built the search using AND and OR but...
0
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
Hello group. I've migrated from Win 2003 server to Win 2008 server. I've been banging my head agaist a wall for several days now trying to figure this out. I have the following script that will...
18
by: luke noob | last post by:
can some one please help me adapt my script so that i can search for multiple words within my database, my keywords feild looks something like this.... Big Teddie Bear Collection Tiny Small...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.