perl tar ext cheack
Hi,
I tried doing some thing like this. Code:
I wanted. Is there any other way to test if the file is tar? Thanks |
To use regex testing, you need the '=~' notation:
Code:
if( $name =~ m/$tar/ ){ |
Thanks so much!
Actually what I needed was not equal to. but when i do Code:
if( $name !=~ m/$tar/ ) Sorry. And thanks for your help |
Perhaps you should explain in some detail what you mean by "doesn't work". What are you trying to accomplish? What are you seeing? Your posted code is only an incomplete fragment; does the complete script compile with errors or warnings?
--- rod. |
I am sorry again I was too busy to update.
I used it as Code:
if ($name =~ m/$tar/){ I worked as i wanted thank you so much. |
|
All times are GMT -5. The time now is 01:55 AM. |