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 too - no changes. Also I thought about file / directory permissions and tried the script running as root - also no changes. When I create a new script by copy and paste (not writing per hand) with just the lines related to the file output and change the $1 to something meaningful - it works. Therefor I thought, it has to do something with the other script. First I thought about the "undef $/", but I also added it to the "mini-script" and it stil worked. [Owen] > I would have thought that to get a $1 out of that you would have > needed while ($input =~ m/(...)/) ie, brackets around what you wanted > to capture. Of cause! You're right. The regex is quite big, therefor I ommitted it and just replaced it by 3 dots. If you like to see the regex, here it is: ----------------- snip --------------------------------------- my $pat_separator = qr{\s*^\s+_{10,}\s*?$}; my $pat_pkg_name = qr{^(.*?)\s+dependencies\s*?$}; my $pat_pkg_depend = qr{ (?:^|\s*,|\s*or|\s*and) [ ]+ (\[\d+\]([a-zA-Z][a-zA-Z0-9._ -]*[a-zA-Z0-9])) (?=(,|\s*or|\s*and|\s*_{10,}|\s*Optional|\s*Required|\s*Recommended)) }x; while ($input =~ m/$pat_separator \s*? $pat_pkg_name /xsmg) { ... ----------------- snap ----------------------------------------- kind regards Reinhard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>