Re: Regex

2005-04-16 Thread $Bill Luebkert
Jim Hansen wrote: > Sorry. Lousy explanation. I have a string that will have > PSserver01...02, etc. I need to check for this string: > > $Printserver = "HP4000 [PSserver01]" > > I guess this can be as simple as > > $Printserver = "HP4000 [PSserver01]" > > if ( ! /PSserver/ ) {

RE: Regex

2005-04-16 Thread Robert Johnson
Jim Hansen wrote: > THat's not doing it either. For some reason, when it > is compiled, that line is ignored. > sorry, i missed the part where you said it was working as a script, but not as a compiled executable. I don't use the ActiveState compiler, and don't know why that would be happeni

RE: Regex

2005-04-16 Thread Jim Hansen
THat's not doing it either. For some reason, when it is compiled, that line is ignored. --- Robert Johnson <[EMAIL PROTECTED]> wrote: > Jim Hansen wrote: > > > > $name = 'HP4000 [PSserver01]'; > > if ( $name =~ /[PSserver/ ) { > > next; > > } > > running this straight as a script with the '-d'

RE: Regex

2005-04-16 Thread Robert Johnson
Jim Hansen wrote: > > $name = 'HP4000 [PSserver01]'; > if ( $name =~ /[PSserver/ ) { > next; > } > running this straight as a script with the '-d' switch > or without, it works fine, but if I compile it and run > it, for some reason it is ignored and I end up with my > issue. IS there a better wa

RE: Regex

2005-04-16 Thread Jim Hansen
Thanks for all the great ideas. What I decided to do was just check for '[PSserver' because this part is causing me issues and it isn't needed. In my script I have writtern as such. I would like to split the two apart, but can just do a next and ignore it for now. $name = 'HP4000 [PSserver01]';

RE: Regex

2005-04-16 Thread Robert Johnson
Jim Hansen wrote: > > Sorry. Lousy explanation. I have a string that will have > PSserver01...02, etc. I need to check for this string: > > $Printserver = "HP4000 [PSserver01]" > > I guess this can be as simple as > > $Printserver = "HP4000 [PSserver01]" > if ( ! /PSserver/ ) { > do > }

Re: Regex

2005-04-16 Thread Jim Hansen
Sorry.  Lousy explanation.  I have a string that will have PSserver01...02, etc.  I need to check for this string:   $Printserver = "HP4000 [PSserver01]"   I guess this can be as simple as   $Printserver = "HP4000 [PSserver01]" if ( ! /PSserver/ ) { do } Thanks $Bill Luebkert <[EMAIL PROTECTED]> w

Re: Help with XML::Simple

2005-04-16 Thread Rhesa Rozendaal
James wrote: Hi All, I am trying to process a XML file and print some info but my script is not printing anything. Please help Here is my code You don't use "use strict;" or "use warnings;". Shame on you, James! It would have told you what the problem was. use XML::Simple; use Data::Dumper; my $

RE: Regex

2005-04-16 Thread Bullock, Howard A.
You do not say what you want to do with the line or the value for which you are searching. You also do specify if “xx” is only numeric or not. But anyway…   if ($String =~ /PSserver../){   #do something… }   if ($String =~ /PSserver\d\d/){   #do something… }   You should checkout

Problem with OLE Excel SaveAs Method

2005-04-16 Thread amar reddy
Hai All- I Have problem with OLE Excel SaveAs method, if its sounds too silly forgive me.we need to create a HTML Doc from Excel Worlsheet. We are able to save the file as Excel with the follwoing statement $xl->ActiveWorkbook->SaveAs( { FileName => "$xlfile" }); But