Removing vertical lines from error bars quickly

Howdy everyone. I have a function that can remove all error bars from a plot quickly, and it works great (I think I modified it from another code snit-bit that I found here). I would like to modify it so that I only remove the lines (not the caps) from the error bars, i.e., make the lines have zero thickness. The current function is what removes the error bars (click on the graph, then click in the command window and type/execute the function):
function rmErrBars() // removes error bars from plot
    string trl=tracenamelist("",";",1), item
    variable items=itemsinlist(trl), i
    for(i=0;i<items;i+=1)
        item=stringfromlist(i,trl)
        ErrorBars $item OFF
    endfor
end

In order to just remove the lines, this is the code that has to be run:
ErrorBars/L=0/Y=1 waveOnGraph Y,wave=(errorWave,errorWave)

I think what I need is a way to determine what "errorWave" is, given the name "waveOnGraph" or $item in the snit-bit above. Any thoughts/ideas?
Thanks in advance!
Use the function TraceInfo on your "item" to get a string with keyword-value pairs about that trace, then get the error bar info using the function StringByKey. This returns a string close to the code you need to run, just without the L=0 flag. So, do a ReplaceString command to add the L=0 flag. Last, you now have the command in string form, so you can use "Execute" to run it. Alternatively, you could parse the string to just figure out your error wave name (without doing the ReplaceString bit).

In highly nested form, this would do the trick (replace the "0" with "i" in your loop):
Execute ReplaceString("ErrorBars",StringByKey("ERRORBARS",TraceInfo("",StringFromList(0,TraceNameList("",";",1)),0)),"ErrorBars/L=0")
It's also worth mentioning that you can do this in the GUI. In the Modify Trace Appearance dialog, if you select all the traces before clicking the error bar options, changing the line width to 0 will apply to all the traces without changing the error bar waves. This works in both Igor 6 and 7, though in Igor 6 you have to uncheck then check the Error Bars box to get the options to pop up.
Great, thanks! This completely addresses the original problem. On looking at it further, however, it seems that there is also a /T flag that might need to be dealt with, as in
ErrorBars/T=2/L=2 waveOnGraph XY,wave=(errorWaveX,errorWaveX),wave=(errorWaveY,errorWaveY)

Unfortunately, the /T flag comes prior to the /L flag, so putting /L=0 immediately after "ErrorBars" just results in it being overridden by the second /L= flag.
Thoughts?
Thanks again!
Doing it with ReplaceString is going to be hard to get bulletproof, because in the general case, /L=# could have any value or not even be present. If you know that your traces always have error bars with a given specified line width of 2, you could use ReplaceString("/L=2",inStr,"/L=0") instead of my original suggestion.

As to my other suggestion of parsing the ErrorBars string which may be more general, you could use the "strsearch" command to find the error waves based on the last comma in the string. For example, if your error bar properties string was "errorstring", you could extract the error bar wave name as errorwavestring=errorstring[strsearch(errorstring,",",inf,1)+1,strlen(errorstring)-1]. I didn't test this but you get the idea.