Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Grep question

by hok_si_la (Curate)
on Feb 03, 2005 at 18:12 UTC ( #427752=note: print w/ replies, xml ) Need Help??


in reply to Re: Grep question
in thread Grep question

Thanks all of you. I have made the suggested changes. I will need to look at them more in depth.

I have a similar question for those of you with patience. I am trying to remove an item from an array using the delete function. Here is the code:

@statusoption = ('Waiting Approval' , 'Denied' , 'Approved' , 'Ordered +' , 'Building' , 'Built' , 'Shipped'); delete $statusoption[3];
This simply yields ('Waiting Approval' , 'Denied' , 'Approved' , '' , 'Building' , 'Built' , 'Shipped')
I would like to remove 'Ordered' from the array and shift all the other elements down an index truncating the array by 1.

I appreciate you help,
hok_si_la


Comment on Re^2: Grep question
Download Code
Re^3: Grep question
by Roy Johnson (Monsignor) on Feb 03, 2005 at 18:19 UTC
    That's what splice is for:
    splice(@statusoption, 3, 1);

    Caution: Contents may have been coded under pressure.
      Ahhhhhhh! Thanks, you have been most helpful. Have a good super bowl weekend if you are in to that kind of thing.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://427752]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2014-04-17 02:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls