incognito wrote:
>Thank you for your attention, Bob.
>
>>What is your actual regex? At a minimum, you'll need /g modifier.
>>You may need /m and/or /s as well.
>
>May be I didn't explained my prob exactly. I don't have a problem
>with the regex (and yes, I have the /m /g and /s). Related to the
>
Wc -Sx- Jones wrote:
[snip]
>
> my $file = "20040301-www.tgz";
>
[snip]
>
> But I have a question -
>
> Does even mentioning (?:) usage break capturing?
>
> I get undefined errors when trying:
>
> $file =~ /^(\d+)-www.t(?:ar.)gz/i;
> print $1;
no. it won't break capturing. you get undef
Owen wrote:
On Mon, 1 Mar 2004 18:08:08 +0100
incognito <[EMAIL PROTECTED]> wrote:
open(FH, "> $pkg_filename") or die "could not create $pkg_filename";
while ($input =~ m/.../) {
print $1;
FH->print("$1\n") or die "could not write to $pkg_filename";
}
I would have thought that to g
Thank you Bob and Owen.
[Bob]
> I notice you don't put an explicit path on the filename. Is it possible the
> current directory is something other that what you expect it to be, and the
> file is being successfully created in another location?
I thought about that and so I tried an absolute path
On Mon, 1 Mar 2004 18:08:08 +0100
incognito <[EMAIL PROTECTED]> wrote:
> open(FH, "> $pkg_filename") or die "could not create $pkg_filename";
> while ($input =~ m/.../) {
> print $1;
> FH->print("$1\n") or die "could not write to $pkg_filename";
> }
I would have thought that to ge
incognito wrote:
> Thank you for your attention, Bob.
>
> > What is your actual regex? At a minimum, you'll need /g modifier.
> > You may need /m and/or /s as well.
>
> May be I didn't explained my prob exactly.
> I don't have a problem with the regex (and yes, I have the /m /g and
> /s). Related
Thank you for your attention, Bob.
> What is your actual regex? At a minimum, you'll need /g modifier. You may
> need /m and/or /s as well.
May be I didn't explained my prob exactly.
I don't have a problem with the regex (and yes, I have the /m /g and /s).
Related to the regex, my script works fi
Reinhard Mantey wrote:
> undef $/;
> my $input = <>;
> my $pkg_filename = "longnames.txt";
>
> open(FH, "> $pkg_filename") or die "could not create $pkg_filename";
> while ($input =~ m/.../) {
What is your actual regex? At a minimum, you'll need /g modifier. You may
need /m and/or /s as well.
Hello,
I came to perl by J.Friedl's regex-book without any perl-experiences.
I wrote a little script to scan packages and their dependencies from a book
(lfs). The script works fine and I get the packages with their dependencies.
Now I tried to expand that script that way, that I wanted to write
Hello,
I came to perl by J.Friedl's regex-book without any perl-experiences.
I wrote a little script to scan packages and their dependencies from a book
(lfs). The script works fine and I get the packages with their dependencies.
Now I tried to expand that script that way, that I wanted to write
10 matches
Mail list logo