SPUG: Help with this error

Luis Medrano lmzaldivar at mac.com
Thu Oct 7 15:29:37 CDT 2004


This how it works
$temp is the line of the file I'm processing and when they fines the line what contains this "*.jpg". it brakes.

$temp=$file[5221]; ## this contains *.jpg
if ($linea=~m/$temp/){ ## and here is where it brakes.

any ideas?


On Thursday, October 07, 2004, at 01:15PM, CJ Collier <cjcollier at colliertech.org> wrote:

>$temp is getting dynamically build, no?  well, the part that comes
>before the * is not getting set.  How do you build $temp?  $temp =
>"$foo*$bar+$baz?" or some such?  If it's something like this, $foo isn't
>being set.  If $foo is built as $foo = $x ? $y : "", and $x is not set,
>$foo will be "", which will cause $temp to be set to "*$bar+$baz?",
>which is not a valid regex.
>If you paste more code, we can give you more specific and less imaginary
>help :)
>On Thu, 2004-10-07 at 11:37 -0700, Luis Medrano wrote:
>> List,
>> I processing a log file. but I check a pather:
>>  if ($linea=~m/$temp/){
>> but for some reason after process 5221 lines of the log is showing this:
>> Quantifier follows nothing in regex; marked by <-- HERE in m/* <-- HERE .jpg / at phrases_db.pl line 
>> 37
>> (this is line 37  if ($linea=~m/$temp/){)
>> Any idea of what is going on?
>> Thanks,
>> Luis
>> _____________________________________________________________
>> Seattle Perl Users Group Mailing List  
>> POST TO: spug-list at mail.pm.org  http://spugwiki.perlocity.org
>> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
>> MEETINGS: 3rd Tuesdays, Location Unknown
>> WEB PAGE: http://www.seattleperl.org

More information about the spug-list mailing list