Omega -1911 wrote:
> @liners = split /(\s\[0-9],\s)Powerball:\s[0-9]/,$data_string;
Instead of split, just do a pattern match:
($a[0], $a[1], $a[2], $a[3], $a[4], $b) = /(\d+), (\d+), (\d+),
(\d+), (\d+), Powerball: (\d+)/;
This puts the first five numbers into the array @a, and puts the
power
siegfried wrote:
> Thanks, but if I am piping from stdin to stdout I see two problems:
>
> (1) how do I implement the -n flags that tell me the line number and
> file name where the matches are
Well, as long as you're only piping one file at a time, the line
number part isn't a problem; but I see
siegfried wrote:
> I need to search large amounts of source code and grep is not doing the job.
> The problem is that I keep matching stuff in the comments of the
> C++/Java/Perl/Groovy/Javascript source code.
>
> Can someone give me some hints on where I might start on rewriting grep in
> perl so
Rob Dixon wrote:
> Jonathan Lang wrote:
> > I'm trying to devise a regex that matches from the first double-quote
> > character found to the next double-quote character that isn't part of
> > a pair; but for some reason, I'm
I'm trying to devise a regex that matches from the first double-quote
character found to the next double-quote character that isn't part of
a pair; but for some reason, I'm having no luck. Here's what I tried:
/"(.*?)"(?!")/
Sample text:
author: "Jonathan ""Dataweaver"" Lang" key=val
What
On 9/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> There is a report that is generated from a script as a plain text file. I
> need to take this output file as input for my script and join them and create
> a CSV file and mail to me daily. How can I create CSV file with out using
> modul
Ruprecht Helms wrote:
> Hi,
>
> how can I parse a csv-file where the entries are seperated with | .
> The scripts later should put them into a mysql-database using dbi.
>
> Especially for me is interessting how to parse the content of the file
> and store them into different variables for later pr
Chas Owens wrote:
Well, there is a prototype problem, but it isn't that $ will force new
to only accept one value, but rather that prototypes and OO Perl don't
mix. Perl simply ignores prototypes on methods. Also prototypes are
broken*, don't use them.
-snip-
* http://library.n0i.net/programm
Alma wrote:
Hi ,
Urgent help.
I have written 2 modules one abc.pm & xyz.pm (admin modules).
abc.pm
--
my $databasehandle;
Note that this establishes a single $databasehandle for every object
of type 'abc' that you create; it does not create a separate one
Alma wrote:
Hi All,
I need to pass the result of prepare statement as an argument to the
subroutine.
-snip-
abc is calling delete_file() . where it need to delete the file stored
at the location mentioned in file_path.
Its not giving me an error but its not deleting the files from the
locatio
10 matches
Mail list logo