Is there anyway to better match a line that started with a dot from the begining to the end of the close parenthesis?Below is a sample from the file:
.upper_house3({located in east valley}) \\good neigbourhood
.upper_house1({located in east valley}) \\good neigbourhood
.upper_house2({located in...
use strict;
foreach $file_path (@file_path)
{
print "$file_path\n" #this has the full path to each file
my $count = 0 ;
while ( $count >= 0 )
{
$count++ ;
$FH = "FILE" . "$count" ;
open $$FH , "$file_path" or last ;
}
print "\n...
i'm using a file handle to open multiple files but I'm not getting the actual results - not knowing how many files that are opened. do you guys know any little code I can use?
Below is what I'm using but its giving me a bogus answer.
use strict;
my $count = 0 ;
while ( $count >= 0 )...
do anyone know the best way to capture pattern match and capture the data from the begining of a delimeter to the end of the delimeter.
see sample data below
/* its a marvelous day and the weather is warm
now is the time to settle our differences
and embrace each other with one love */
I...
do anyone know the best way to capture pattern match and capture the data from the begining of a delimeter to the end of the delimeter.
see sample data below
/* its a marvelous day and the weather is warm
now is the time to settle our differences
and embrace each other with one love */
I...
use strict;
my %hash = ();
open (DATA, "c:\\sample.txt") or "can't";
while (<DATA>)
{
next if ! /^(\.\w*)\s*(\(.*\))/;;
#print "$_\n";
#the next 2 lines is for taken out whitespace from the data
$data = $_;
$data =~ s/\s+//;
$data =~ s/^\s+$//...
actually, I did not use Miller's pattern matching, I use a different one that works for what I need it for. the only problem now is to split each line into two and store them in hash. I was able to split the lines spaces in them with this code but not the line that does not have space in...
I was able to pattern match what i want but when I tried to put the data into the hash table I did not get the result that I wanted. below is the original file. the result I will like to have is to save the first half of the data as the key and the other half as the value. But some of the...
sofar below is what I have
open (FILE, $filename) or die " can't";
while (<FILE>)
{
if ( /(.raf | .licoln)_group*\)/) #pattern matching each line from the begining to the closing parenthesis
$new_info = $_;
$key_info= (split '', $new_info)[1]; #trying to split the each line into two so that...
I'm working on a data mining script that will be used to save some pattern in an hash table. Below is the information on a sample file that I'm working on
.raf_group(first line);
.licoln_group(second line);
.start_raf_group(fitth line); //templated
wired .raf_group_firm ({help me...
I tried the step you gave me but when I tried to run the process, I got this error "system cannot find the file specified". I save the perl script in my "c:" drive and it should be able to find it. Below is my code maybe you will have any help you can render.
Private Sub Form1_Load(ByVal...
im using "shell" command in a Form to run a process which was created in Perl. I will like to stop any user from exiting from the form unless the process is done running. what code can I use. Thank you in advance
param1_folderLoc = Convert.ToString(totalSelected.Item(index))
procID =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.