Re: Removing block of text in string

2009-01-20 Thread Hridyesh Pant
$string = 'this is my text string type="text/javascript">char(13) + char(10)function popup(theURL) { char(13) + char(10)popup_large(theURL); char(13) + char(10)char(13) + char(10)}char(13) + char(10)function popup_large(theURL) { char(13) + char(10)if (theU

Re: RegExp Searching within

$_ = ""; while (/<(.*?)>(.*?)<\/\1>/g) { print "tag $1 which has $2 inside\n"; } Paul M wrote: Hi: Given the following list: I want to know all the "elements" within elem1. (Note: It is seriously MALFORMED XML, that is why I am attempting to use regexp). Any ideas. I can get $1

Re: Get the last entry of log file

try this... perl -ne'$l = $_; END { print $l }' /tmp/1.txt --Hridyesh Stewart Anderson wrote: From: Rob Coops [mailto:[EMAIL PROTECTED] Sent: 17 September 2008 12:55 To: Mr. Shawn H. Corey Cc: Manasi Bopardikar; beginners@perl.org Subject: Re: Get the last entry of log file my $last_line; whil

Re: Regexp in PERL

$string =" 234234"; $string =~ s/(\s*)(?=\d+)//g; print ("$string"); anders wrote: Hi i have som text with " and space and then a numbers eg. " 234234 I tested to write $line =~ s/\" [0-9]/[0-9]/g; I like it to change " 234 to "234 But it made "[0-9] Anyone how should i have write to tel

Re: while loops and the bedlam of the hash key

in my case this works while (<>) { chomp; my ($id, $record) = split(/\t+/,$_); push @{$table{$id}}, $record; } foreach $id (sort keys %table) { print "$id "; my @records = @{$table{$id}}; print join ', ', sort @records; print "\n"; } --Hridyesh fraz

Re: Loop within Loop

you can use hash,where key is the column and value is the refrence to an array,and this array can contain multiple data. --Hridyesh Gunnar Hjalmarsson wrote: Bobby wrote: I have a text file with five colums of data (ColumA-E). Within each column there could be multiple data with a comma seper

How to get package dependecies list before installing a package.

Hi , Is there any way to find out what other package dependencies needed for an un-install package in unix? Thanks Hridyesh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Putting file content into an array

Suggestion given by "[EMAIL PROTECTED]", Sayed, Irfan; your questions are *too basic*. Any Perl programmer who has read the first seven documents referred by "perldoc perl" will know the questions you're asking. Please read these: perldoc pe

Need information for Tcl/tk

Hi, I want to start Tcl/tk,Can anybody guide me good book or link for the beginner. Thanks Hridyesh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Error PPM installing in WinXP

Hi, I tried from ppm ,same error is coming. Regards Hridyesh Robert Hicks wrote: hridyesh pant wrote: Hi, I downloaded |Date-Calc package| from http://ppm.activestate.com/PPMPackages/zips <http://ppm.activestate.com/PPMPackages/zips/> 1. Unzip the package to a directory

Error PPM installing in WinXP

Hi, I downloaded |Date-Calc package| from http://ppm.activestate.com/PPMPackages/zips 1. Unzip the package to a directory say C:\perlmodule\Date-Calc-5.4. 2. Install the package by specifying the ppd file directly: |ppm install |C:\perlmo

Re: File search.

which one is more efficient to search a file File::Find or File::glob Regards Hridyesh John W. Krahn wrote: hridyesh pant wrote: Hi, Hello, I want to search a particular file inside the the first level of directories. like i have the directories like /usr/local/bin, /usr

File search.

Hi, I want to search a particular file inside the the first level of directories. like i have the directories like /usr/local/bin, /usr/package/bin , /usr/lib/samba etc i want to search a file only inside the first level of directories like /usr/local,/usr/package,/usr/lib etc.. I check wi

Re: Help...

have taken to tackle it, and what problems you are facing in your solution. So, my reply was just a suggestion from someone who is also in the learning stage in Perl programming and nothing more! How you take it depends on you! Dhanashri -Original Message- From: hridyesh pant [mailt

Help...

Hi, Is there a way to pass a Value from one perl Program(a.pl) to another Perl program(b.pl). Regards hridyesh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Date difference.

Thanks Thomas i got it. Regards Hridyesh Thomas Bätzler wrote: Hi, i have two date string reading from the log file like below. $date1="Mon Mar 27 02:45:15 2006"; $date2="Wed Apr 5 23:20:46 2006"; $Number_of_Days = $date1-$date2; i want to get number of days between these two dates. Can

Date difference.

Hi, i have two date string reading from the log file like below. $date1="Mon Mar 27 02:45:15 2006"; $date2="Wed Apr 5 23:20:46 2006"; $Number_of_Days = $date1-$date2; i want to get number of days between these two dates. Can someone help me. Thanks Hridyesh -- To unsubscribe, e-mail: [E